diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-11-30 00:52:23 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 3e85e833a707e6b781d00eae09c9465bacbf1d69 (patch) | |
tree | 096a7b2347255a70783d0470d2f992d50a50d3d8 /src/game | |
parent | 850385465543a9bd589084ec2ac6b0693c481fea (diff) | |
download | openttd-3e85e833a707e6b781d00eae09c9465bacbf1d69.tar.xz |
Codechange: Add support for additional command result values.
Diffstat (limited to 'src/game')
-rw-r--r-- | src/game/game_instance.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/game/game_instance.cpp b/src/game/game_instance.cpp index fa44ee97c..09bba1334 100644 --- a/src/game/game_instance.cpp +++ b/src/game/game_instance.cpp @@ -13,6 +13,7 @@ #include "../script/squirrel_class.hpp" #include "../script/script_storage.hpp" +#include "../script/script_cmd.h" #include "../ai/ai_gui.hpp" #include "game_config.hpp" #include "game_info.hpp" @@ -85,10 +86,11 @@ void GameInstance::Died() * @param result The result of the command. * @param tile The tile on which the command was executed. * @param data Command data as given to Command<>::Post. + * @param result_data Additional returned data from the command. */ -void CcGame(Commands cmd, const CommandCost &result, TileIndex tile, const CommandDataBuffer &data) +void CcGame(Commands cmd, const CommandCost &result, TileIndex tile, const CommandDataBuffer &data, CommandDataBuffer result_data) { - if (Game::GetGameInstance()->DoCommandCallback(result, tile, data, cmd)) { + if (Game::GetGameInstance()->DoCommandCallback(result, tile, data, std::move(result_data), cmd)) { Game::GetGameInstance()->Continue(); } } |