OpenTTD Source: src/terraform_cmd.h Source File

OpenTTD Source 13.2.1

terraform_cmd.h
Go to the documentation of this file.
1 /*
2 * This file is part of OpenTTD.
3 * OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
4 * OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
5 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
6 */
7
10 #ifndef TERRAFORM_CMD_H
11 #define TERRAFORM_CMD_H
12
13 #include "command_type.h"
14 #include "map_type.h"
15 #include "slope_type.h"
16
17 std::tuple<CommandCost, Money, TileIndex> CmdTerraformLand(DoCommandFlag flags, TileIndex tile, Slope slope, bool dir_up);
18 std::tuple<CommandCost, Money, TileIndex> CmdLevelLand(DoCommandFlag flags, TileIndex tile, TileIndex start_tile, bool diagonal, LevelMode lm);
19
20 DEF_CMD_TRAIT(CMD_TERRAFORM_LAND, CmdTerraformLand, CMD_ALL_TILES | CMD_AUTO, CMDT_LANDSCAPE_CONSTRUCTION)
21 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
22
23 CommandCallback CcPlaySound_EXPLOSION;
24 void CcTerraform(Commands cmd, const CommandCost &result, Money, TileIndex tile);
25
26 #endif /* TERRAFORM_CMD_H */
CMD_LEVEL_LAND
@ CMD_LEVEL_LAND
level land
Definition: command_type.h:303
Commands
Commands
List of commands.
Definition: command_type.h:176
CmdTerraformLand
std::tuple< CommandCost, Money, TileIndex > CmdTerraformLand(DoCommandFlag flags, TileIndex tile, Slope slope, bool dir_up)
Terraform land.
Definition: terraform_cmd.cpp:186
TileIndex
The index/ID of a Tile.
Definition: tile_type.h:85
CommandCallback
void CommandCallback(Commands cmd, const CommandCost &result, TileIndex tile)
Define a callback function for the client, after the command is finished.
Definition: command_type.h:465
DoCommandFlag
DoCommandFlag
List of flags for a command.
Definition: command_type.h:355
Slope
Slope
Enumeration for the slope-type.
Definition: slope_type.h:48
CommandCost
Common return value for all commands.
Definition: command_type.h:24
CMD_AUTO
@ CMD_AUTO
set the DC_AUTO flag on this command
Definition: command_type.h:381
map_type.h
CmdLevelLand
std::tuple< CommandCost, Money, TileIndex > CmdLevelLand(DoCommandFlag flags, TileIndex tile, TileIndex start_tile, bool diagonal, LevelMode lm)
Levels a selected (rectangle) area of land.
Definition: terraform_cmd.cpp:335
command_type.h
CMD_TERRAFORM_LAND
@ CMD_TERRAFORM_LAND
terraform a tile
Definition: command_type.h:187
CMD_ALL_TILES
@ CMD_ALL_TILES
allow this command also on MP_VOID tiles
Definition: command_type.h:382
CMD_NO_TEST
@ CMD_NO_TEST
the command's output may differ between test and execute due to town rating changes etc.
Definition: command_type.h:383
LevelMode
LevelMode
Argument for CmdLevelLand describing what to do.
Definition: map_type.h:81
OverflowSafeInt< int64 >
slope_type.h
CMDT_LANDSCAPE_CONSTRUCTION
@ CMDT_LANDSCAPE_CONSTRUCTION
Construction and destruction of objects on the map.
Definition: command_type.h:395