forked from rosebudai/OpenRCT2-Web
1 parent
b0fd5f93d7
commit
c602db27fd
3 files changed
+9
-1
No files matched your search
@@ -43,7 +43,7 @@
|
||||
using namespace OpenRCT2;
|
||||
using namespace OpenRCT2::Scripting;
|
||||
|
||||
static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 8;
|
||||
static constexpr int32_t OPENRCT2_PLUGIN_API_VERSION = 9;
|
||||
|
||||
struct ExpressionStringifier final
|
||||
{
|
||||
@@ -1090,6 +1090,7 @@ void ScriptEngine::RunGameActionHooks(const GameAction& action, std::unique_ptr<
|
||||
DukObject args(_context);
|
||||
DukFromGameActionParameterVisitor visitor(args);
|
||||
const_cast<GameAction&>(action).AcceptParameters(visitor);
|
||||
const_cast<GameAction&>(action).AcceptFlags(visitor);
|
||||
obj.Set("args", args.Take());
|
||||
}
|
||||
|
||||
@@ -1129,6 +1130,7 @@ std::unique_ptr<GameAction> ScriptEngine::CreateGameAction(const std::string& ac
|
||||
DukValue argsCopy = args;
|
||||
DukToGameActionParameterVisitor visitor(std::move(argsCopy));
|
||||
action->AcceptParameters(visitor);
|
||||
action->AcceptFlags(visitor);
|
||||
return action;
|
||||
}
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user