Allow referencing waypoints in news items

This commit is contained in:
Jonathan G Rennison
2021-01-21 22:55:30 +00:00
parent ac6581ac8f
commit 01c051793c
2 changed files with 5 additions and 1 deletions

View File

@@ -71,7 +71,7 @@ static TileIndex GetReferenceTile(NewsReferenceType reftype, uint32 ref)
{
switch (reftype) {
case NR_TILE: return (TileIndex)ref;
case NR_STATION: return Station::Get((StationID)ref)->xy;
case NR_STATION: return BaseStation::Get((StationID)ref)->xy;
case NR_INDUSTRY: return Industry::Get((IndustryID)ref)->location.tile + TileDiffXY(1, 1);
case NR_TOWN: return Town::Get((TownID)ref)->xy;
default: return INVALID_TILE;