From 67bf6a0998eb7e0be39449ca5b2563ace66b3a30 Mon Sep 17 00:00:00 2001 From: smatz Date: Sun, 4 Jan 2009 18:34:23 +0000 Subject: (svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too --- src/train_cmd.cpp | 25 ------------------------- 1 file changed, 25 deletions(-) (limited to 'src/train_cmd.cpp') diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 58981720c..5521b0b8f 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -4471,31 +4471,6 @@ void Train::OnNewDay() } } -void TrainsYearlyLoop() -{ - Vehicle *v; - - FOR_ALL_VEHICLES(v) { - if (v->type == VEH_TRAIN && IsFrontEngine(v)) { - /* show warning if train is not generating enough income last 2 years (corresponds to a red icon in the vehicle list) */ - if (_settings_client.gui.train_income_warn && v->owner == _local_company && v->age >= 730 && v->GetDisplayProfitThisYear() < 0) { - SetDParam(1, v->GetDisplayProfitThisYear()); - SetDParam(0, v->index); - AddNewsItem( - STR_TRAIN_IS_UNPROFITABLE, - NS_ADVICE, - v->index, - 0); - } - - v->profit_last_year = v->profit_this_year; - v->profit_this_year = 0; - InvalidateWindow(WC_VEHICLE_DETAILS, v->index); - } - } -} - - void InitializeTrains() { _age_cargo_skip_counter = 1; -- cgit v1.2.3-54-g00ecf