(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
This commit is contained in:
belugas 2008-06-14 01:08:59 +00:00
parent d8fde03ec7
commit a91eb2ad13
3 changed files with 11 additions and 7 deletions

View File

@ -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})

View File

@ -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;

View File

@ -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;
}