summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2009-12-08 19:59:21 +0000
committerfrosch <frosch@openttd.org>2009-12-08 19:59:21 +0000
commit9dd74395c881c0710d6caf50dedb6cb41590b64e (patch)
tree590d8f49fbb8d4c917e3a8835fdf7e544c1ad837 /src/town_gui.cpp
parent85f8765618985bd86703669f9b449c91364593fd (diff)
downloadopenttd-9dd74395c881c0710d6caf50dedb6cb41590b64e.tar.xz
(svn r18433) -Codechange: Show different texts in town GUI when the town does not need food the whole year to grow.
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index 4951254ca..fef1e5da4 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -374,10 +374,12 @@ public:
SetDParam(1, this->town->max_mail);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_MAIL_LAST_MONTH_MAX);
+ StringID required_text = STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED;
uint cargo_needed_for_growth = 0;
switch (_settings_game.game_creation.landscape) {
case LT_ARCTIC:
if (TilePixelHeight(this->town->xy) >= LowestSnowLine()) cargo_needed_for_growth = 1;
+ if (TilePixelHeight(this->town->xy) < GetSnowLine()) required_text = STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED_WINTER;
break;
case LT_TROPIC:
@@ -408,7 +410,7 @@ public:
DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_LAST_MONTH);
} else {
SetDParam(0, food_name);
- DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED);
+ DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, required_text);
}
if (cargo_needed_for_growth > 1) {
@@ -418,7 +420,7 @@ public:
DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_LAST_MONTH);
} else {
SetDParam(0, water_name);
- DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_REQUIRED);
+ DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, required_text);
}
}
}