Add: AI/GS GetMonthlyMaintenanceCost (#6897)
API addition which allows AI/GS scripts to retrieve the monthly maintenance cost of an airport type.
This commit is contained in:

committed by
Niels Martin Hansen

parent
4703cd433d
commit
1e68b9b3e6
@@ -163,3 +163,10 @@
|
||||
|
||||
return AirportSpec::Get(type)->maintenance_cost;
|
||||
}
|
||||
|
||||
/* static */ Money ScriptAirport::GetMonthlyMaintenanceCost(AirportType type)
|
||||
{
|
||||
if (!IsAirportInformationAvailable(type)) return -1;
|
||||
|
||||
return (int64)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
|
||||
}
|
||||
|
Reference in New Issue
Block a user