mirror of https://github.com/OpenRCT2/OpenRCT2.git
Do not attempt to pack JSON objects into S6 files.
This commit is contained in:
parent
5bfc41f49e
commit
b9e85f6b90
|
@ -5,6 +5,7 @@
|
|||
- Feature: [#11306] Path additions are now kept when replacing the path.
|
||||
- Fix: [#6119]: Advertising campaign for ride window not updated properly (original bug).
|
||||
- Fix: [#11072] Land and water tools working out of bounds (original bug).
|
||||
- Fix: [#11259] Custom JSON object breaks saves.
|
||||
- Fix: [#11315] Ride that has never opened is shown as favorite ride of many guests.
|
||||
- Improved: [#6530] Allow water and land height changes on park borders.
|
||||
|
||||
|
|
|
@ -176,6 +176,7 @@ private:
|
|||
StringTable _stringTable;
|
||||
ImageTable _imageTable;
|
||||
std::vector<uint8_t> _sourceGames;
|
||||
bool _isJsonObject{};
|
||||
|
||||
protected:
|
||||
StringTable& GetStringTable()
|
||||
|
@ -199,6 +200,16 @@ public:
|
|||
explicit Object(const rct_object_entry& entry);
|
||||
virtual ~Object();
|
||||
|
||||
void MarkAsJsonObject()
|
||||
{
|
||||
_isJsonObject = true;
|
||||
}
|
||||
|
||||
bool IsJsonObject() const
|
||||
{
|
||||
return _isJsonObject;
|
||||
};
|
||||
|
||||
// Legacy data structures
|
||||
const char* GetIdentifier() const
|
||||
{
|
||||
|
|
|
@ -429,6 +429,7 @@ namespace ObjectFactory
|
|||
std::memcpy(entry.name, originalName.c_str(), minLength);
|
||||
|
||||
result = CreateObject(entry);
|
||||
result->MarkAsJsonObject();
|
||||
auto readContext = ReadObjectContext(objectRepository, id, !gOpenRCT2NoGraphics, fileRetriever);
|
||||
result->ReadJson(&readContext, jRoot);
|
||||
if (readContext.WasError())
|
||||
|
|
|
@ -207,7 +207,8 @@ public:
|
|||
for (size_t i = 0; i < numObjects; i++)
|
||||
{
|
||||
const ObjectRepositoryItem* item = &_objectRepository.GetObjects()[i];
|
||||
if (item->LoadedObject != nullptr && IsObjectCustom(item) && item->LoadedObject->GetLegacyData() != nullptr)
|
||||
if (item->LoadedObject != nullptr && IsObjectCustom(item) && item->LoadedObject->GetLegacyData() != nullptr
|
||||
&& !item->LoadedObject->IsJsonObject())
|
||||
{
|
||||
objects.push_back(item);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue