diff options
Diffstat (limited to 'src/newgrf_station.cpp')
-rw-r--r-- | src/newgrf_station.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 312ca59d5..19f32bd75 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -368,6 +368,16 @@ TownScopeResolver *StationResolverObject::GetTown() return res; } + case 0x6A: { // GRFID of nearby station tiles + TileIndex nearby_tile = GetNearbyTile(parameter, this->tile); + + if (!HasStationTileRail(nearby_tile)) return 0xFFFFFFFF; + if (!IsCustomStationSpecIndex(nearby_tile)) return 0; + + const StationSpecList ssl = BaseStation::GetByTile(nearby_tile)->speclist[GetCustomStationSpecIndex(nearby_tile)]; + return ssl.grfid; + } + /* General station variables */ case 0x82: return 50; case 0x84: return this->st->string_id; |