summaryrefslogtreecommitdiff
path: root/train_gui.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-31 22:28:49 +0000
committertron <tron@openttd.org>2005-07-31 22:28:49 +0000
commit4190e5581d8ed3f48ce5bc04f4d5e184a7787501 (patch)
tree52a037ba490af20715d8b4d664e8f734759c9cbe /train_gui.c
parent1adb0e868c269c8f1a02b41cfb49ccc13d457e60 (diff)
downloadopenttd-4190e5581d8ed3f48ce5bc04f4d5e184a7787501.tar.xz
(svn r2772) Simplify the age notice in the vehicle details window
Diffstat (limited to 'train_gui.c')
-rw-r--r--train_gui.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/train_gui.c b/train_gui.c
index cc9f224ce..2b6e22d5e 100644
--- a/train_gui.c
+++ b/train_gui.c
@@ -1122,7 +1122,6 @@ static void DrawTrainDetailsWindow(Window *w)
const Vehicle *v, *u;
uint16 tot_cargo[NUM_CARGO][2]; // count total cargo ([0]-actual cargo, [1]-total cargo)
int i,num,x,y,sel;
- StringID str;
byte det_tab = WP(w, traindetails_d).tab;
/* Count number of vehicles */
@@ -1171,13 +1170,7 @@ static void DrawTrainDetailsWindow(Window *w)
x = 2;
- str = STR_0199_YEAR;
- if (num != 1) {
- str += STR_019A_YEARS - STR_0199_YEAR;
- if ((uint16)(v->max_age - 366) < v->age)
- str += STR_019B_YEARS - STR_019A_YEARS;
- }
- SetDParam(0, str);
+ SetDParam(0, (v->age + 365 < v->max_age) ? STR_AGE : STR_AGE_RED);
SetDParam(2, v->max_age / 366);
SetDParam(3, GetTrainRunningCost(v) >> 8);
DrawString(x, 15, STR_885D_AGE_RUNNING_COST_YR, 0);