diff options
author | belugas <belugas@openttd.org> | 2008-06-14 01:08:59 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2008-06-14 01:08:59 +0000 |
commit | bcb71a011e229b9a20653c04610c6a455e1e73f5 (patch) | |
tree | b8e3559d886f66e27a9fe1fd49affc6d30fef894 | |
parent | fd08e7b51ab1d842fc40d407f3f0bb3d42018e96 (diff) | |
download | openttd-bcb71a011e229b9a20653c04610c6a455e1e73f5.tar.xz |
(svn r13513) -Codechange: Give proper message when building a river fails.
Give proper description of a river tile with the Query Tool.
Extracted (in part) from FS#1884, by Ammler
-rw-r--r-- | src/lang/english.txt | 3 | ||||
-rw-r--r-- | src/terraform_gui.cpp | 2 | ||||
-rw-r--r-- | src/water_cmd.cpp | 13 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt index cb0e12e4e..e01c4dc35 100644 --- a/src/lang/english.txt +++ b/src/lang/english.txt @@ -1291,6 +1291,9 @@ STR_CANT_BUILD_LOCKS :{WHITE}Can't bu STR_BUILD_LOCKS_TIP :{BLACK}Build locks STR_LANDINFO_LOCK :Lock +STR_CANT_PLACE_RIVERS :{WHITE}Can't place rivers here... +STR_LANDINFO_RIVER :River + STR_BUOY_IS_IN_USE :{WHITE}...buoy is in use! STR_LANDINFO_COORDS :{BLACK}Coordinates: {LTBLUE}{NUM}x{NUM}x{NUM} ({STRING}) diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp index c341d6c1e..a6c492961 100644 --- a/src/terraform_gui.cpp +++ b/src/terraform_gui.cpp @@ -135,7 +135,7 @@ bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_t DoCommandP(end_tile, start_tile, _ctrl_pressed, CcBuildCanal, CMD_BUILD_CANAL | CMD_MSG(STR_CANT_BUILD_CANALS)); break; case DDSP_CREATE_RIVER: - DoCommandP(end_tile, start_tile, 2, CcBuildCanal, CMD_BUILD_CANAL | CMD_MSG(STR_CANT_BUILD_CANALS)); + DoCommandP(end_tile, start_tile, 2, CcBuildCanal, CMD_BUILD_CANAL | CMD_MSG(STR_CANT_PLACE_RIVERS)); break; default: return false; diff --git a/src/water_cmd.cpp b/src/water_cmd.cpp index 6caa8abf1..b72b0a9cf 100644 --- a/src/water_cmd.cpp +++ b/src/water_cmd.cpp @@ -734,15 +734,16 @@ static void GetTileDesc_Water(TileIndex tile, TileDesc *td) { switch (GetWaterTileType(tile)) { case WATER_TILE_CLEAR: - if (!IsCanal(tile)) { - td->str = STR_3804_WATER; - } else { - td->str = STR_LANDINFO_CANAL; + switch (GetWaterClass(tile)) { + case WATER_CLASS_SEA: td->str = STR_3804_WATER; break; + case WATER_CLASS_CANAL: td->str = STR_LANDINFO_CANAL; break; + case WATER_CLASS_RIVER: td->str = STR_LANDINFO_RIVER; break; + default: assert(0); break; } break; case WATER_TILE_COAST: td->str = STR_3805_COAST_OR_RIVERBANK; break; - case WATER_TILE_LOCK : td->str = STR_LANDINFO_LOCK; break; - case WATER_TILE_DEPOT: td->str = STR_3806_SHIP_DEPOT; break; + case WATER_TILE_LOCK : td->str = STR_LANDINFO_LOCK; break; + case WATER_TILE_DEPOT: td->str = STR_3806_SHIP_DEPOT; break; default: assert(0); break; } |