summaryrefslogtreecommitdiff
path: root/src/water_cmd.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/water_cmd.cpp')
-rw-r--r--src/water_cmd.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp
index 681ccb331..abb68dce9 100644
--- a/src/water_cmd.cpp
+++ b/src/water_cmd.cpp
@@ -285,6 +285,10 @@ CommandCost CmdBuildLock(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
case SLOPE_NE: dir = DIAGDIR_NE; break;
default: return_cmd_error(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION);
}
+
+ /* Disallow building of locks on river rapids */
+ if (IsRiverTile(tile)) return_cmd_error(STR_0239_SITE_UNSUITABLE);
+
return DoBuildShiplift(tile, dir, flags);
}