static */
| 147 | } |
| 148 | |
| 149 | /* static */ TownID ScriptAirport::GetNearestTown(TileIndex tile, AirportType type) |
| 150 | { |
| 151 | if (!::IsValidTile(tile)) return TownID::Invalid(); |
| 152 | if (!IsAirportInformationAvailable(type)) return TownID::Invalid(); |
| 153 | |
| 154 | const AirportSpec *as = AirportSpec::Get(type); |
| 155 | if (!as->IsWithinMapBounds(0, tile)) return TownID::Invalid(); |
| 156 | |
| 157 | uint dist; |
| 158 | const auto &layout = as->layouts[0]; |
| 159 | return AirportGetNearestTown(as, layout.rotation, tile, AirportTileTableIterator(layout.tiles, tile), dist)->index; |
| 160 | } |
| 161 | |
| 162 | /* static */ SQInteger ScriptAirport::GetMaintenanceCostFactor(AirportType type) |
| 163 | { |
nothing calls this directly
no test coverage detected