diff options
author | Michael Lutz <michi@icosahedron.de> | 2021-11-17 23:54:46 +0100 |
---|---|---|
committer | Michael Lutz <michi@icosahedron.de> | 2021-12-16 22:28:32 +0100 |
commit | 1a42a8a5d50e917a3b7158feadc70205cf912cba (patch) | |
tree | fa6e6a02cf4e7d02da46a604608446cdd0522ba4 /src/town_cmd.h | |
parent | e08b3abe7ff65c193781a74c170f45b2f1dcf0a5 (diff) | |
download | openttd-1a42a8a5d50e917a3b7158feadc70205cf912cba.tar.xz |
Codechange: Un-bitstuff town-related commands.
Diffstat (limited to 'src/town_cmd.h')
-rw-r--r-- | src/town_cmd.h | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/src/town_cmd.h b/src/town_cmd.h index 7842e7dda..4c9782e48 100644 --- a/src/town_cmd.h +++ b/src/town_cmd.h @@ -11,16 +11,20 @@ #define TOWN_CMD_H #include "command_type.h" +#include "company_type.h" +#include "town_type.h" -CommandProc CmdFoundTown; -CommandProc CmdRenameTown; -CommandProc CmdDoTownAction; -CommandProc CmdTownGrowthRate; -CommandProc CmdTownRating; -CommandProc CmdTownCargoGoal; -CommandProc CmdTownSetText; -CommandProc CmdExpandTown; -CommandProc CmdDeleteTown; +enum TownEffect : byte; + +CommandCost CmdFoundTown(DoCommandFlag flags, TileIndex tile, TownSize size, bool city, TownLayout layout, bool random_location, uint32 townnameparts, const std::string &text); +CommandCost CmdRenameTown(DoCommandFlag flags, TownID town_id, const std::string &text); +CommandCost CmdDoTownAction(DoCommandFlag flags, TownID town_id, uint8 action); +CommandCost CmdTownGrowthRate(DoCommandFlag flags, TownID town_id, uint16 growth_rate); +CommandCost CmdTownRating(DoCommandFlag flags, TownID town_id, CompanyID company_id, int16 rating); +CommandCost CmdTownCargoGoal(DoCommandFlag flags, TownID town_id, TownEffect te, uint32 goal); +CommandCost CmdTownSetText(DoCommandFlag flags, TownID town_id, const std::string &text); +CommandCost CmdExpandTown(DoCommandFlag flags, TownID town_id, uint32 grow_amount); +CommandCost CmdDeleteTown(DoCommandFlag flags, TownID town_id); DEF_CMD_TRAIT(CMD_FOUND_TOWN, CmdFoundTown, CMD_DEITY | CMD_NO_TEST, CMDT_LANDSCAPE_CONSTRUCTION) // founding random town can fail only in exec run DEF_CMD_TRAIT(CMD_RENAME_TOWN, CmdRenameTown, CMD_DEITY | CMD_SERVER, CMDT_OTHER_MANAGEMENT) |