Initial commit to allow configuring running costs as a fraction (1/1 default thru 1/4) independently for both vehicles stopped in depots (doesn't work for planes, I'm not smart enuff), or vehicles that are stationary.
This commit is contained in:
@@ -229,6 +229,13 @@ Money Ship::GetRunningCost() const
|
||||
{
|
||||
const Engine *e = this->GetEngine();
|
||||
uint cost_factor = GetVehicleProperty(this, PROP_SHIP_RUNNING_COST_FACTOR, e->u.ship.running_cost);
|
||||
|
||||
/* running costs if in depot */
|
||||
if (IsShipDepotTile(this->tile)) cost_factor /= _settings_game.difficulty.vehicle_costs_in_depot;
|
||||
|
||||
/* running costs if stopped */
|
||||
if ((this->cur_speed == 0) && !(IsShipDepotTile(this->tile))) cost_factor /= _settings_game.difficulty.vehicle_costs_when_stopped;
|
||||
|
||||
return GetPrice(PR_RUNNING_SHIP, cost_factor, e->GetGRF());
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user