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.
|
|
|
|
|
*****************************************************************************/
|
|
|
|
|
|
2025-05-16 12:54:14 +02:00
|
|
|
#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;
|
|
|
|
|
|
2025-05-16 12:54:14 +02:00
|
|
|
void ScenarioMetaObject::Load()
|
2024-10-27 14:53:27 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-16 12:54:14 +02:00
|
|
|
void ScenarioMetaObject::Unload()
|
2024-10-27 14:53:27 +01:00
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-16 12:54:14 +02:00
|
|
|
void ScenarioMetaObject::ReadJson(IReadObjectContext* context, json_t& root)
|
2024-10-27 14:53:27 +01:00
|
|
|
{
|
2025-05-16 12:54:14 +02: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);
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-16 12:54:14 +02:00
|
|
|
std::string ScenarioMetaObject::GetScenarioName()
|
2024-10-27 14:53:27 +01:00
|
|
|
{
|
2024-10-27 19:23:12 +01:00
|
|
|
return GetStringTable().GetString(ObjectStringID::NAME); // SCENARIO_NAME
|
2024-10-27 14:53:27 +01:00
|
|
|
}
|
|
|
|
|
|
2025-05-16 12:54:14 +02:00
|
|
|
std::string ScenarioMetaObject::GetParkName()
|
2024-10-27 14:53:27 +01:00
|
|
|
{
|
|
|
|
|
return GetStringTable().GetString(ObjectStringID::PARK_NAME);
|
|
|
|
|
}
|
|
|
|
|
|
2025-05-16 12:54:14 +02:00
|
|
|
std::string ScenarioMetaObject::GetScenarioDetails()
|
2024-10-27 14:53:27 +01:00
|
|
|
{
|
|
|
|
|
return GetStringTable().GetString(ObjectStringID::SCENARIO_DETAILS);
|
|
|
|
|
}
|