summaryrefslogtreecommitdiff
path: root/src/town_gui.cpp
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-11-23 16:05:19 +0000
committertruebrain <truebrain@openttd.org>2011-11-23 16:05:19 +0000
commit229e572663158d8fd37cabf3c2a3cb06811ff0a1 (patch)
treee27f01fdf1de01262be29bb795b0be8d54b04f5e /src/town_gui.cpp
parent4e09cde6495f35a6d56cacc0dbf636df7bc94dbd (diff)
downloadopenttd-229e572663158d8fd37cabf3c2a3cb06811ff0a1.tar.xz
(svn r23298) -Add: track statistics of all incoming and outgoing goods. Incoming based on TownEffect, outgoing based on CargoType (based on patch by Terkhen)
Diffstat (limited to 'src/town_gui.cpp')
-rw-r--r--src/town_gui.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/town_gui.cpp b/src/town_gui.cpp
index bf7527e7b..1097abb42 100644
--- a/src/town_gui.cpp
+++ b/src/town_gui.cpp
@@ -368,12 +368,12 @@ public:
SetDParam(1, this->town->num_houses);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y, STR_TOWN_VIEW_POPULATION_HOUSES);
- SetDParam(0, this->town->pass.old_act);
- SetDParam(1, this->town->pass.old_max);
+ SetDParam(0, this->town->supplied[CT_PASSENGERS].old_act);
+ SetDParam(1, this->town->supplied[CT_PASSENGERS].old_max);
DrawString(r.left + WD_FRAMERECT_LEFT, r.right - WD_FRAMERECT_LEFT, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_PASSENGERS_LAST_MONTH_MAX);
- SetDParam(0, this->town->mail.old_act);
- SetDParam(1, this->town->mail.old_max);
+ SetDParam(0, this->town->supplied[CT_MAIL].old_act);
+ SetDParam(1, this->town->supplied[CT_MAIL].old_max);
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;
@@ -406,9 +406,9 @@ public:
CargoID first_water_cargo = (water != NULL) ? water->Index() : (CargoID)CT_INVALID;
StringID water_name = (water != NULL) ? water->name : STR_CARGO_PLURAL_WATER;
- if (first_food_cargo != CT_INVALID && this->town->food.old_act > 0) {
+ if (first_food_cargo != CT_INVALID && this->town->received[TE_FOOD].old_act > 0) {
SetDParam(0, first_food_cargo);
- SetDParam(1, this->town->food.old_act);
+ SetDParam(1, this->town->received[TE_FOOD].old_act);
DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_LAST_MONTH);
} else {
SetDParam(0, food_name);
@@ -416,9 +416,9 @@ public:
}
if (cargo_needed_for_growth > 1) {
- if (first_water_cargo != CT_INVALID && this->town->water.old_act > 0) {
+ if (first_water_cargo != CT_INVALID && this->town->received[TE_WATER].old_act > 0) {
SetDParam(0, first_water_cargo);
- SetDParam(1, this->town->water.old_act);
+ SetDParam(1, this->town->received[TE_WATER].old_act);
DrawString(cargo_text_left, cargo_text_right, y += FONT_HEIGHT_NORMAL, STR_TOWN_VIEW_CARGO_FOR_TOWNGROWTH_LAST_MONTH);
} else {
SetDParam(0, water_name);