mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-16 19:43:06 +01:00
Use sourceGame parameter in JSON files instead of originalId
This commit is contained in:
committed by
Gymnasiast
parent
71bd110526
commit
2a64ec7aff
@@ -112,7 +112,8 @@ public:
|
||||
item.ObjectEntry = *object->GetObjectEntry();
|
||||
item.Path = path;
|
||||
item.Name = object->GetName();
|
||||
item.Source = object->GetSecondSourceGame();
|
||||
item.Sources[0] = object->GetSourceGame();
|
||||
item.Sources[1] = object->GetSecondSourceGame();
|
||||
object->SetRepositoryItem(&item);
|
||||
delete object;
|
||||
return std::make_tuple(true, item);
|
||||
@@ -126,7 +127,7 @@ protected:
|
||||
stream->WriteValue(item.ObjectEntry);
|
||||
stream->WriteString(item.Path);
|
||||
stream->WriteString(item.Name);
|
||||
stream->WriteValue(item.Source);
|
||||
stream->WriteArray(item.Sources, 2);
|
||||
|
||||
switch (object_entry_get_type(&item.ObjectEntry))
|
||||
{
|
||||
@@ -159,7 +160,10 @@ protected:
|
||||
item.ObjectEntry = stream->ReadValue<rct_object_entry>();
|
||||
item.Path = stream->ReadStdString();
|
||||
item.Name = stream->ReadStdString();
|
||||
item.Source = stream->ReadValue<uint8_t>();
|
||||
auto sources = stream->ReadArray<uint8_t>(2);
|
||||
item.Sources[0] = sources[0];
|
||||
item.Sources[1] = sources[1];
|
||||
Memory::Free(sources);
|
||||
|
||||
switch (object_entry_get_type(&item.ObjectEntry))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user