diff options
author | truebrain <truebrain@openttd.org> | 2011-12-19 20:57:34 +0000 |
---|---|---|
committer | truebrain <truebrain@openttd.org> | 2011-12-19 20:57:34 +0000 |
commit | 9359c6fc47f6fabddc399d044ea74dc6ebfdfb05 (patch) | |
tree | 0e29635b5f349432059dc99b36df10aac24981f8 /src/script/api/script_depotlist.cpp | |
parent | 436cf09923d881f3c11c8a4b6262c0a89ad1ee73 (diff) | |
download | openttd-9359c6fc47f6fabddc399d044ea74dc6ebfdfb05.tar.xz |
(svn r23615) -Add: more API functions exposed to NoGo (part 2)
Diffstat (limited to 'src/script/api/script_depotlist.cpp')
-rw-r--r-- | src/script/api/script_depotlist.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/script/api/script_depotlist.cpp b/src/script/api/script_depotlist.cpp index c66850b67..072cddf1c 100644 --- a/src/script/api/script_depotlist.cpp +++ b/src/script/api/script_depotlist.cpp @@ -29,7 +29,7 @@ ScriptDepotList::ScriptDepotList(ScriptTile::TransportType transport_type) /* Hangars are not seen as real depots by the depot code. */ const Station *st; FOR_ALL_STATIONS(st) { - if (st->owner == ::_current_company) { + if (st->owner == ::_current_company || ::_current_company == OWNER_DEITY) { for (uint i = 0; i < st->airport.GetNumHangars(); i++) { this->AddItem(st->airport.GetHangarTile(i)); } @@ -42,6 +42,6 @@ ScriptDepotList::ScriptDepotList(ScriptTile::TransportType transport_type) /* Handle 'standard' depots. */ const Depot *depot; FOR_ALL_DEPOTS(depot) { - if (::GetTileOwner(depot->xy) == ::_current_company && ::IsTileType(depot->xy, tile_type)) this->AddItem(depot->xy); + if ((::GetTileOwner(depot->xy) == ::_current_company || ::_current_company == OWNER_DEITY) && ::IsTileType(depot->xy, tile_type)) this->AddItem(depot->xy); } } |