Files
OpenRCT2-Web/src/openrct2/object/ScenarioMetaObject.cpp
T

46 lines
1.3 KiB
C++
Raw Normal View History

2024-10-27 14:53:27 +01:00
/*****************************************************************************
2024-12-31 20:30:04 +01:00
* Copyright (c) 2014-2025 OpenRCT2 developers
2024-10-27 14:53:27 +01:00
*
* For a complete list of all authors, please refer to contributors.md
* Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2
*
* OpenRCT2 is licensed under the GNU General Public License version 3.
*****************************************************************************/
#include "ScenarioMetaObject.h"
2024-10-27 14:53:27 +01:00
#include "../Context.h"
#include "../PlatformEnvironment.h"
#include "../core/Guard.hpp"
#include "../core/Json.hpp"
using namespace OpenRCT2;
void ScenarioMetaObject::Load()
2024-10-27 14:53:27 +01:00
{
}
void ScenarioMetaObject::Unload()
2024-10-27 14:53:27 +01:00
{
}
void ScenarioMetaObject::ReadJson(IReadObjectContext* context, json_t& root)
2024-10-27 14:53:27 +01:00
{
Guard::Assert(root.is_object(), "ScenarioMetaObject::ReadJson expects parameter root to be an object");
2024-10-27 14:53:27 +01:00
PopulateTablesFromJson(context, root);
}
std::string ScenarioMetaObject::GetScenarioName()
2024-10-27 14:53:27 +01:00
{
return GetStringTable().GetString(ObjectStringID::NAME); // SCENARIO_NAME
2024-10-27 14:53:27 +01:00
}
std::string ScenarioMetaObject::GetParkName()
2024-10-27 14:53:27 +01:00
{
return GetStringTable().GetString(ObjectStringID::PARK_NAME);
}
std::string ScenarioMetaObject::GetScenarioDetails()
2024-10-27 14:53:27 +01:00
{
return GetStringTable().GetString(ObjectStringID::SCENARIO_DETAILS);
}