|
@@ -2967,13 +2967,13 @@ static Track ChooseTrainTrack(Vehicle* v
|
|
|
/* PF didn't find the route */
|
|
|
if (!HasBit(v->u.rail.flags, VRF_NO_PATH_TO_DESTINATION)) {
|
|
|
/* it is first time the problem occurred, set the "path not found" flag */
|
|
|
SetBit(v->u.rail.flags, VRF_NO_PATH_TO_DESTINATION);
|
|
|
/* and notify user about the event */
|
|
|
if (_settings_client.gui.lost_train_warn && v->owner == _local_company) {
|
|
|
SetDParam(0, v->unitnumber);
|
|
|
SetDParam(0, v->index);
|
|
|
AddNewsItem(
|
|
|
STR_TRAIN_IS_LOST,
|
|
|
NS_ADVICE,
|
|
|
v->index,
|
|
|
0);
|
|
|
}
|
|
@@ -4307,13 +4307,13 @@ static void TrainLocoHandler(Vehicle *v,
|
|
|
/* Still stuck. */
|
|
|
if (turn_around) ReverseTrainDirection(v);
|
|
|
|
|
|
if (HasBit(v->u.rail.flags, VRF_TRAIN_STUCK) && v->load_unload_time_rem > 2 * _settings_game.pf.wait_for_pbs_path * DAY_TICKS) {
|
|
|
/* Show message to player. */
|
|
|
if (_settings_client.gui.lost_train_warn && v->owner == _local_company) {
|
|
|
SetDParam(0, v->unitnumber);
|
|
|
SetDParam(0, v->index);
|
|
|
AddNewsItem(
|
|
|
STR_TRAIN_IS_STUCK,
|
|
|
NS_ADVICE,
|
|
|
v->index,
|
|
|
0);
|
|
|
}
|
|
@@ -4477,13 +4477,13 @@ void TrainsYearlyLoop()
|
|
|
|
|
|
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->unitnumber);
|
|
|
SetDParam(0, v->index);
|
|
|
AddNewsItem(
|
|
|
STR_TRAIN_IS_UNPROFITABLE,
|
|
|
NS_ADVICE,
|
|
|
v->index,
|
|
|
0);
|
|
|
}
|