summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-11-16 14:17:49 +0000
committerrubidium <rubidium@openttd.org>2008-11-16 14:17:49 +0000
commitcdfa2d68b135618c8865caebaeb03910250b8bfa (patch)
tree12d252929ee68a0e7efa115413b4bb45a616aa5e
parentffa3ec54f9047116495532c20b986f955cf13c4d (diff)
downloadopenttd-cdfa2d68b135618c8865caebaeb03910250b8bfa.tar.xz
(svn r14582) -Fix [FS#2392]: blank box on cost estimation of levelling a flat area.
-Fix: make levelling, raising and lowering of an area behave the same.
-rw-r--r--src/lang/english.txt6
-rw-r--r--src/terraform_cmd.cpp1
-rw-r--r--src/terraform_gui.cpp2
3 files changed, 6 insertions, 3 deletions
diff --git a/src/lang/english.txt b/src/lang/english.txt
index 63cd073ec..e0e071bbf 100644
--- a/src/lang/english.txt
+++ b/src/lang/english.txt
@@ -1643,6 +1643,7 @@ STR_0805_ESTIMATED_COST :{WHITE}Estimate
STR_0807_ESTIMATED_INCOME :{WHITE}Estimated Income: {CURRENCY}
STR_0808_CAN_T_RAISE_LAND_HERE :{WHITE}Can't raise land here...
STR_0809_CAN_T_LOWER_LAND_HERE :{WHITE}Can't lower land here...
+STR_CAN_T_LEVEL_LAND_HERE :{WHITE}Can't level land here...
STR_080A_ROCKS :Rocks
STR_080B_ROUGH_LAND :Rough land
STR_080C_BARE_LAND :Bare land
@@ -1655,8 +1656,9 @@ STR_0810_DESERT :Desert
STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION :{WHITE}Land sloped in wrong direction
STR_1001_IMPOSSIBLE_TRACK_COMBINATION :{WHITE}Impossible track combination
STR_1002_EXCAVATION_WOULD_DAMAGE :{WHITE}Excavation would damage tunnel
-STR_1003_ALREADY_AT_SEA_LEVEL :{WHITE}Already at sea-level
-STR_1004_TOO_HIGH :{WHITE}Too high
+STR_1003_ALREADY_AT_SEA_LEVEL :{WHITE}... already at sea level
+STR_1004_TOO_HIGH :{WHITE}... too high
+STR_ALREADY_LEVELLED :{WHITE}... already flat
STR_1005_NO_SUITABLE_RAILROAD_TRACK :{WHITE}No suitable railway track
STR_1007_ALREADY_BUILT :{WHITE}...already built
STR_1008_MUST_REMOVE_RAILROAD_TRACK :{WHITE}Must remove railway track first
diff --git a/src/terraform_cmd.cpp b/src/terraform_cmd.cpp
index f35fb8bd5..fe8d96570 100644
--- a/src/terraform_cmd.cpp
+++ b/src/terraform_cmd.cpp
@@ -359,6 +359,7 @@ CommandCost CmdLevelLand(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* Check range of destination height */
if (h > MAX_TILE_HEIGHT) return_cmd_error((oldh == 0) ? STR_1003_ALREADY_AT_SEA_LEVEL : STR_1004_TOO_HIGH);
+ if (p2 == 0) _error_message = STR_ALREADY_LEVELLED;
/* make sure sx,sy are smaller than ex,ey */
int ex = TileX(tile);
diff --git a/src/terraform_gui.cpp b/src/terraform_gui.cpp
index 4fc09ad76..589dce191 100644
--- a/src/terraform_gui.cpp
+++ b/src/terraform_gui.cpp
@@ -123,7 +123,7 @@ bool GUIPlaceProcDragXY(ViewportDragDropSelectionProcess proc, TileIndex start_t
DoCommandP(end_tile, start_tile, (uint32)-1, CcTerraform, CMD_LEVEL_LAND | CMD_MSG(STR_0809_CAN_T_LOWER_LAND_HERE));
break;
case DDSP_LEVEL_AREA:
- DoCommandP(end_tile, start_tile, 0, CcPlaySound10, CMD_LEVEL_LAND);
+ DoCommandP(end_tile, start_tile, 0, CcPlaySound10, CMD_LEVEL_LAND | CMD_MSG(STR_CAN_T_LEVEL_LAND_HERE));
break;
case DDSP_CREATE_ROCKS:
GenerateRockyArea(end_tile, start_tile);