mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-12 09:09:09 +00:00
Cleanup: [Script] Remove ScriptStation::GetOwner
Due to class inheritance, GSStation::GetOwner and GSWaypoint::GetOwner can both reach GetOwner defined at GSBaseStation.
This commit is contained in:
@@ -26,13 +26,6 @@
|
||||
return st != nullptr && (st->owner == ScriptObject::GetCompany() || ScriptCompanyMode::IsDeity() || st->owner == OWNER_NONE);
|
||||
}
|
||||
|
||||
/* static */ ScriptCompany::CompanyID ScriptStation::GetOwner(StationID station_id)
|
||||
{
|
||||
if (!IsValidStation(station_id)) return ScriptCompany::COMPANY_INVALID;
|
||||
|
||||
return ScriptCompany::ToScriptCompanyID(::Station::Get(station_id)->owner);
|
||||
}
|
||||
|
||||
/* static */ StationID ScriptStation::GetStationID(TileIndex tile)
|
||||
{
|
||||
if (!::IsValidTile(tile) || !::IsTileType(tile, MP_STATION)) return StationID::Invalid();
|
||||
|
@@ -59,15 +59,6 @@ public:
|
||||
*/
|
||||
static bool IsValidStation(StationID station_id);
|
||||
|
||||
/**
|
||||
* Get the owner of a station.
|
||||
* @param station_id The station to get the owner of.
|
||||
* @pre IsValidStation(station_id).
|
||||
* @return The owner the station has.
|
||||
* @api -ai
|
||||
*/
|
||||
static ScriptCompany::CompanyID GetOwner(StationID station_id);
|
||||
|
||||
/**
|
||||
* Get the StationID of a tile, if there is a station.
|
||||
* @param tile The tile to find the stationID of
|
||||
|
Reference in New Issue
Block a user