Add: [Script] GetAirportNumHelipads (#12085)

Adds a function for Scripts to get the number of helipads of an airport type.
This commit is contained in:
SamuXarick
2024-02-14 20:38:32 +00:00
committed by GitHub
parent a64ca2e0c5
commit 8584d1b5bb
6 changed files with 32 additions and 3 deletions

View File

@@ -170,3 +170,10 @@
return (int64_t)GetMaintenanceCostFactor(type) * _price[PR_INFRASTRUCTURE_AIRPORT] >> 3;
}
/* static */ SQInteger ScriptAirport::GetAirportNumHelipads(AirportType type)
{
if (!IsAirportInformationAvailable(type)) return -1;
return ::AirportSpec::Get(type)->fsm->num_helipads;
}