1
0
Fork 0

Cleanup: [Script] Remove ScriptStation::GetOwner

Due to class inheritance, GSStation::GetOwner and GSWaypoint::GetOwner can both reach GetOwner defined at GSBaseStation.
pull/13406/head
SamuXarick 2025-02-01 21:05:49 +00:00
parent bb70dffe70
commit fe9eae3be7
2 changed files with 0 additions and 16 deletions

View File

@ -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();

View File

@ -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