(svn r4785) - Newstations: don't draw catenary on non-track tiles
This commit is contained in:
@@ -702,3 +702,23 @@ bool IsStationTileBlocked(TileIndex tile)
|
||||
|
||||
return HASBIT(statspec->blocked, GetStationGfx(tile));
|
||||
}
|
||||
|
||||
/* Check if a rail station tile is electrifiable.
|
||||
* XXX This could be cached (during build) in the map array to save on all the dereferencing */
|
||||
bool IsStationTileElectrifiable(TileIndex tile)
|
||||
{
|
||||
const Station *st;
|
||||
const StationSpec *statspec;
|
||||
uint specindex;
|
||||
|
||||
if (!IsCustomStationSpecIndex(tile)) return true;
|
||||
|
||||
st = GetStationByTile(tile);
|
||||
specindex = GetCustomStationSpecIndex(tile);
|
||||
if (specindex >= st->num_specs) return false;
|
||||
|
||||
statspec = st->speclist[specindex].spec;
|
||||
if (statspec == NULL) return false;
|
||||
|
||||
return HASBIT(statspec->pylons, GetStationGfx(tile));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user