Show buy cost and running cost in template windows

See: #312
This commit is contained in:
Jonathan G Rennison
2021-08-22 13:52:13 +01:00
parent d67f63a04e
commit 5afa1b93eb
7 changed files with 30 additions and 0 deletions

View File

@@ -110,6 +110,16 @@ Money CalculateOverallTemplateCost(const TemplateVehicle *tv)
return val;
}
Money CalculateOverallTemplateDisplayRunningCost(const TemplateVehicle *tv)
{
Money val = 0;
for (; tv; tv = tv->GetNextUnit()) {
val += (Engine::Get(tv->engine_type))->GetDisplayRunningCost();
}
return val;
}
void DrawTemplate(const TemplateVehicle *tv, int left, int right, int y)
{
if (!tv) return;