mirror of https://github.com/OpenRCT2/OpenRCT2.git
parent
b0fd5f93d7
commit
c602db27fd
|
@ -1,5 +1,6 @@
|
|||
0.3.2+ (in development)
|
||||
------------------------------------------------------------------------
|
||||
- Feature: [#13057] Make GameAction flags accessible by plugins.
|
||||
- Change: [#13346] Change FootpathScenery to FootpathAddition in all occurrences
|
||||
- Fix: [#13334] Uninitialised variables in CustomTabDesc
|
||||
- Fix: [#13342] Rename tabChange to onTabChange in WindowDesc interface
|
||||
|
|
|
@ -233,6 +233,11 @@ public:
|
|||
{
|
||||
}
|
||||
|
||||
void AcceptFlags(GameActionParameterVisitor& visitor)
|
||||
{
|
||||
visitor.Visit("flags", _flags);
|
||||
}
|
||||
|
||||
NetworkPlayerId_t GetPlayer() const
|
||||
{
|
||||
return _playerId;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue