(svn r23632) -Add: GSCompanyMode, to change company in GameScripts
This commit is contained in:
@@ -13,7 +13,6 @@
|
||||
#include "script_airport.hpp"
|
||||
#include "script_station.hpp"
|
||||
#include "../../station_base.h"
|
||||
#include "../../company_func.h"
|
||||
#include "../../town.h"
|
||||
|
||||
/* static */ bool ScriptAirport::IsValidAirportType(AirportType type)
|
||||
@@ -94,7 +93,7 @@
|
||||
if (!::IsTileType(tile, MP_STATION)) return -1;
|
||||
|
||||
const Station *st = ::Station::GetByTile(tile);
|
||||
if (st->owner != _current_company && _current_company != OWNER_DEITY) return -1;
|
||||
if (st->owner != ScriptObject::GetCompany() && ScriptObject::GetCompany() != OWNER_DEITY) return -1;
|
||||
if ((st->facilities & FACIL_AIRPORT) == 0) return -1;
|
||||
|
||||
return st->airport.GetNumHangars();
|
||||
@@ -107,7 +106,7 @@
|
||||
if (GetNumHangars(tile) < 1) return INVALID_TILE;
|
||||
|
||||
const Station *st = ::Station::GetByTile(tile);
|
||||
if (st->owner != _current_company && _current_company != OWNER_DEITY) return INVALID_TILE;
|
||||
if (st->owner != ScriptObject::GetCompany() && ScriptObject::GetCompany() != OWNER_DEITY) return INVALID_TILE;
|
||||
if ((st->facilities & FACIL_AIRPORT) == 0) return INVALID_TILE;
|
||||
|
||||
return st->airport.GetHangarTile(0);
|
||||
|
Reference in New Issue
Block a user