Scale displayed running costs by day length factor

This commit is contained in:
Jonathan G Rennison
2018-01-25 18:23:15 +00:00
parent aa1a914d96
commit a6a1e67dbc
5 changed files with 23 additions and 12 deletions

View File

@@ -30,6 +30,7 @@
#include "company_base.h"
#include "vehicle_func.h"
#include "articulated_vehicles.h"
#include "settings_type.h"
#include "error.h"
#include "table/strings.h"
@@ -277,6 +278,15 @@ uint Engine::DetermineCapacity(const Vehicle *v, uint16 *mail_capacity) const
return capacity;
}
/**
* Return display value of how much the running costs of this engine are.
* @return Yearly running cost of the engine.
*/
Money Engine::GetDisplayRunningCost() const
{
return this->GetRunningCost() * _settings_game.economy.day_length_factor;
}
/**
* Return how much the running costs of this engine are.
* @return Yearly running cost of the engine.