Merge branch 'running-costs-exploration' into jgrpp
This commit is contained in:
@@ -6481,6 +6481,16 @@ Money Train::GetRunningCost() const
|
||||
cost += GetPrice(e->u.rail.running_cost_class, cost_factor, e->GetGRF());
|
||||
} while ((v = v->GetNextVehicle()) != nullptr);
|
||||
|
||||
if (this->cur_speed == 0) {
|
||||
if (this->IsInDepot()) {
|
||||
/* running costs if in depot */
|
||||
cost = CeilDivT<Money>(cost, _settings_game.difficulty.vehicle_costs_in_depot);
|
||||
} else {
|
||||
/* running costs if stopped */
|
||||
cost = CeilDivT<Money>(cost, _settings_game.difficulty.vehicle_costs_when_stopped);
|
||||
}
|
||||
}
|
||||
|
||||
return cost;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user