1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-21 22:13:07 +01:00

Add path surface object type

This commit is contained in:
Ted John
2021-04-19 22:44:20 +01:00
parent 28fb2611cb
commit 24a29a8a4c
31 changed files with 199 additions and 154 deletions

View File

@@ -130,6 +130,8 @@ public:
protected:
void Serialise(DataSerialiser& ds, ObjectRepositoryItem& item) const override
{
ds << item.Type;
ds << item.Generation;
ds << item.Identifier;
ds << item.ObjectEntry;
ds << item.Path;
@@ -138,7 +140,7 @@ protected:
ds << item.Sources;
ds << item.Authors;
switch (item.ObjectEntry.GetType())
switch (item.Type)
{
case ObjectType::Ride:
ds << item.RideInfo.RideFlags;
@@ -435,7 +437,10 @@ private:
{
_newItemMap[item.Identifier] = index;
}
_itemMap[item.ObjectEntry] = index;
if (!item.ObjectEntry.IsEmpty())
{
_itemMap[item.ObjectEntry] = index;
}
return true;
}
else
@@ -649,8 +654,7 @@ bool IsObjectCustom(const ObjectRepositoryItem* object)
// Do not count our new object types as custom yet, otherwise the game
// will try to pack them into saved games.
auto type = object->ObjectEntry.GetType();
if (type > ObjectType::ScenarioText)
if (object->Type > ObjectType::ScenarioText)
{
return false;
}