mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 06:23:04 +01:00
Read and write version field of .park
This commit is contained in:
@@ -521,6 +521,7 @@ namespace ObjectFactory
|
||||
if (id == OpenRCT2::Audio::AudioObjectIdentifiers::Rct2cBase)
|
||||
id = OpenRCT2::Audio::AudioObjectIdentifiers::Rct2Base;
|
||||
|
||||
auto version = Json::GetString(jRoot["version"]);
|
||||
ObjectEntryDescriptor descriptor;
|
||||
auto originalId = Json::GetString(jRoot["originalId"]);
|
||||
if (originalId.length() == 8 + 1 + 8 + 1 + 8)
|
||||
@@ -539,8 +540,9 @@ namespace ObjectFactory
|
||||
{
|
||||
descriptor = ObjectEntryDescriptor(objectType, id);
|
||||
}
|
||||
|
||||
descriptor.Version = version;
|
||||
result = CreateObject(objectType);
|
||||
result->SetVersion(version);
|
||||
result->SetIdentifier(id);
|
||||
result->SetDescriptor(descriptor);
|
||||
result->MarkAsJsonObject();
|
||||
|
||||
Reference in New Issue
Block a user