mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 15:24:30 +01:00
Add JSON loading for footpath items
This commit is contained in:
@@ -29,6 +29,14 @@ using namespace OpenRCT2;
|
||||
|
||||
namespace ObjectJsonHelpers
|
||||
{
|
||||
bool GetBoolean(const json_t * obj, const std::string &name, bool defaultValue)
|
||||
{
|
||||
auto value = json_object_get(obj, name.c_str());
|
||||
return json_is_boolean(value) ?
|
||||
json_boolean_value(value) :
|
||||
defaultValue;
|
||||
}
|
||||
|
||||
std::string GetString(const json_t * value)
|
||||
{
|
||||
return json_is_string(value) ?
|
||||
|
||||
Reference in New Issue
Block a user