static */
| 90 | } |
| 91 | |
| 92 | /* static */ SQInteger ScriptAirport::GetNumHangars(TileIndex tile) |
| 93 | { |
| 94 | EnforceDeityOrCompanyModeValid(-1); |
| 95 | if (!::IsValidTile(tile)) return -1; |
| 96 | if (!::IsTileType(tile, MP_STATION)) return -1; |
| 97 | |
| 98 | const Station *st = ::Station::GetByTile(tile); |
| 99 | if (st->owner != ScriptObject::GetCompany() && ScriptCompanyMode::IsValid()) return -1; |
| 100 | if (!st->facilities.Test(StationFacility::Airport)) return -1; |
| 101 | |
| 102 | return st->airport.GetNumHangars(); |
| 103 | } |
| 104 | |
| 105 | /* static */ TileIndex ScriptAirport::GetHangarOfAirport(TileIndex tile) |
| 106 | { |
no test coverage detected