From a91eb2ad13eedecb5886bc0c76f5b54532df8bea Mon Sep 17 00:00:00 2001 From: belugas Date: Sat, 14 Jun 2008 01:08:59 +0000 Subject: (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 --- src/lang/english.txt | 3 +++ src/terraform_gui.cpp | 2 +- src/water_cmd.cpp | 13 +++++++------ 3 files changed, 11 insertions(+), 7 deletions(-) (limited to 'src') 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; } -- cgit v1.2.3-70-g09d2