summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2021-11-14 16:39:17 +0100
committerMichael Lutz <michi@icosahedron.de>2021-12-16 22:28:32 +0100
commit6fe445e6c0fa3163aba48b1ec6d810b6594777bd (patch)
tree320cd8d2d76b38ee06f9fde07ea349adeb3f228a /src/water_cmd.cpp
parent21675ec7e22bfe53f20300cc27b4d50c84aeb4dc (diff)
downloadopenttd-6fe445e6c0fa3163aba48b1ec6d810b6594777bd.tar.xz
Codechange: Un-bitstuff station/depot/waypoint commands.
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 07c13adcd..3c96f79ad 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -95,15 +95,12 @@ static void MarkCanalsAndRiversAroundDirty(TileIndex tile)
* Build a ship depot.
* @param flags type of operation
* @param tile tile where ship depot is built
- * @param p1 bit 0 depot orientation (Axis)
- * @param p2 unused
- * @param text unused
+ * @param axis depot orientation (Axis)
* @return the cost of this operation or an error
*/
-CommandCost CmdBuildShipDepot(DoCommandFlag flags, TileIndex tile, uint32 p1, uint32 p2, const std::string &text)
+CommandCost CmdBuildShipDepot(DoCommandFlag flags, TileIndex tile, Axis axis)
{
- Axis axis = Extract<Axis, 0, 1>(p1);
-
+ if (!IsEnumValid(axis)) return CMD_ERROR;
TileIndex tile2 = tile + (axis == AXIS_X ? TileDiffXY(1, 0) : TileDiffXY(0, 1));
if (!HasTileWaterGround(tile) || !HasTileWaterGround(tile2)) {