mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-11 13:10:45 +00:00
(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:
parent
d8fde03ec7
commit
a91eb2ad13
@ -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})
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user