Codechange: Don't use a global for the terrforming error tile.

This commit is contained in:
Michael Lutz
2021-12-01 00:44:57 +01:00
parent 2e39637db2
commit c521b965bd
7 changed files with 46 additions and 54 deletions

View File

@@ -14,13 +14,13 @@
#include "map_type.h"
#include "slope_type.h"
CommandCost CmdTerraformLand(DoCommandFlag flags, TileIndex tile, Slope slope, bool dir_up);
std::tuple<CommandCost, Money> CmdLevelLand(DoCommandFlag flags, TileIndex tile, TileIndex start_tile, bool diagonal, LevelMode lm);
std::tuple<CommandCost, Money, TileIndex> CmdTerraformLand(DoCommandFlag flags, TileIndex tile, Slope slope, bool dir_up);
std::tuple<CommandCost, Money, TileIndex> CmdLevelLand(DoCommandFlag flags, TileIndex tile, TileIndex start_tile, bool diagonal, LevelMode lm);
DEF_CMD_TRAIT(CMD_TERRAFORM_LAND, CmdTerraformLand, CMD_ALL_TILES | CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION)
DEF_CMD_TRAIT(CMD_LEVEL_LAND, CmdLevelLand, CMD_ALL_TILES | CMD_AUTO | CMD_NO_TEST, CMDT_LANDSCAPE_CONSTRUCTION) // test run might clear tiles multiple times, in execution that only happens once
CommandCallback CcPlaySound_EXPLOSION;
CommandCallback CcTerraform;
void CcTerraform(Commands cmd, const CommandCost &result, Money, TileIndex tile);
#endif /* TERRAFORM_CMD_H */