1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-22 22:34:33 +01:00

Read more from JSON, attempt at supporting more types of stalls

This commit is contained in:
Michael Steenbeek
2017-12-05 15:12:28 +01:00
committed by Gymnasiast
parent 3ffdfd1e5d
commit e3b202989f
3 changed files with 44 additions and 10 deletions

View File

@@ -219,7 +219,18 @@ namespace ObjectFactory
auto objectType = std::string(json_string_value(jObjectType));
if (objectType == "ride")
{
std::string objectName = "#RCT1TOI";
std::string objectName;
const char * id = json_string_value(json_object_get(jRoot, "id"));
if (String::Equals(id, "rct1.icecr"))
{
objectName = "#RCT1ICE";
}
else
{
objectName = "#RCT1TOI";
}
rct_object_entry entry = { 0 };
memcpy(entry.name, objectName.c_str(), 8);
result = new RideObject(entry);