summaryrefslogtreecommitdiff
path: root/src/script/api/script_object.hpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-10-03 21:13:32 +0200
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commita38bbefe1b28ac59b2a9fef45765fa3890cde32e (patch)
tree8d842f88a25db5ce231ce5bdb0d39914b7e2ed70 /src/script/api/script_object.hpp
parent549caca39cebc8c988f4e51d79d353cab4646d58 (diff)
downloadopenttd-a38bbefe1b28ac59b2a9fef45765fa3890cde32e.tar.xz
Codechange: Untangle command code, flags and error string for DoCommand*.
Diffstat (limited to 'src/script/api/script_object.hpp')
-rw-r--r--src/script/api/script_object.hpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/script/api/script_object.hpp b/src/script/api/script_object.hpp
index f953b20e4..a1134aa5c 100644
--- a/src/script/api/script_object.hpp
+++ b/src/script/api/script_object.hpp
@@ -13,6 +13,7 @@
#include "../../misc/countedptr.hpp"
#include "../../road_type.h"
#include "../../rail_type.h"
+#include "../../command_type.h"
#include "script_types.hpp"
#include "../script_suspend.hpp"
@@ -69,17 +70,17 @@ protected:
/**
* Executes a raw DoCommand for the script.
*/
- static bool DoCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd, const char *text = nullptr, Script_SuspendCallbackProc *callback = nullptr);
+ static bool DoCommand(TileIndex tile, uint32 p1, uint32 p2, Commands cmd, const char *text = nullptr, Script_SuspendCallbackProc *callback = nullptr);
/**
* Store the latest command executed by the script.
*/
- static void SetLastCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd);
+ static void SetLastCommand(TileIndex tile, uint32 p1, uint32 p2, Commands cmd);
/**
* Check if it's the latest command executed by the script.
*/
- static bool CheckLastCommand(TileIndex tile, uint32 p1, uint32 p2, uint cmd);
+ static bool CheckLastCommand(TileIndex tile, uint32 p1, uint32 p2, Commands cmd);
/**
* Sets the DoCommand costs counter to a value.