Add setting for whether to show vehicle running costs per calendar year

See #660
This commit is contained in:
Jonathan G Rennison
2024-02-26 20:50:20 +00:00
parent a429bddbac
commit 5d7c87f5e4
10 changed files with 31 additions and 9 deletions

View File

@@ -319,7 +319,9 @@ uint Engine::DetermineCapacity(const Vehicle *v, uint16_t *mail_capacity) const
*/
Money Engine::GetDisplayRunningCost() const
{
return this->GetRunningCost() * DayLengthFactor();
Money cost = this->GetRunningCost();
if (_settings_client.gui.show_running_costs_calendar_year) cost *= DayLengthFactor();
return cost;
}
/**