summaryrefslogtreecommitdiff
path: root/ship_gui.c
diff options
context:
space:
mode:
Diffstat (limited to 'ship_gui.c')
-rw-r--r--ship_gui.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/ship_gui.c b/ship_gui.c
index 538d608f7..5a5872f28 100644
--- a/ship_gui.c
+++ b/ship_gui.c
@@ -169,17 +169,10 @@ static void ShipDetailsWndProc(Window *w, WindowEvent *e)
/* Draw running cost */
{
int year = v->age / 366;
- StringID str;
SetDParam(1, year);
- str = STR_0199_YEAR;
- if (year != 1) {
- str++;
- if (v->max_age - 366 < v->age)
- str++;
- }
- SetDParam(0, str);
+ SetDParam(0, (v->age + 365 < v->max_age) ? STR_AGE : STR_AGE_RED);
SetDParam(2, v->max_age / 366);
SetDParam(3, ShipVehInfo(v->engine_type)->running_cost * _price.ship_running >> 8);
DrawString(2, 15, STR_9812_AGE_RUNNING_COST_YR, 0);