mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-20 05:23:04 +01:00
Implement scenario select window
This commit is contained in:
@@ -80,6 +80,13 @@ namespace OpenRCT2::Scripting
|
||||
PopObjectIfExists();
|
||||
}
|
||||
|
||||
void Set(const char* name, std::nullptr_t)
|
||||
{
|
||||
EnsureObjectPushed();
|
||||
duk_push_null(_ctx);
|
||||
duk_put_prop_string(_ctx, _idx, name);
|
||||
}
|
||||
|
||||
void Set(const char* name, bool value)
|
||||
{
|
||||
EnsureObjectPushed();
|
||||
@@ -101,6 +108,13 @@ namespace OpenRCT2::Scripting
|
||||
duk_put_prop_string(_ctx, _idx, name);
|
||||
}
|
||||
|
||||
void Set(const char* name, uint64_t value)
|
||||
{
|
||||
EnsureObjectPushed();
|
||||
duk_push_number(_ctx, value);
|
||||
duk_put_prop_string(_ctx, _idx, name);
|
||||
}
|
||||
|
||||
void Set(const char* name, std::string_view value)
|
||||
{
|
||||
EnsureObjectPushed();
|
||||
@@ -108,6 +122,11 @@ namespace OpenRCT2::Scripting
|
||||
duk_put_prop_string(_ctx, _idx, name);
|
||||
}
|
||||
|
||||
void Set(const char* name, const char* value)
|
||||
{
|
||||
Set(name, std::string_view(value));
|
||||
}
|
||||
|
||||
void Set(const char* name, const DukValue& value)
|
||||
{
|
||||
EnsureObjectPushed();
|
||||
|
||||
Reference in New Issue
Block a user