MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / SetRailStationTileFlags

Function SetRailStationTileFlags

src/station_cmd.cpp:1416–1422  ·  view source on GitHub ↗

* Set rail station tile flags for the given tile. * @param tile Tile to set flags on. * @param statspec Statspec of the tile. */

Source from the content-addressed store, hash-verified

1414 * @param statspec Statspec of the tile.
1415 */
1416void SetRailStationTileFlags(TileIndex tile, const StationSpec *statspec)
1417{
1418 const auto flags = GetStationTileFlags(GetStationGfx(tile), statspec);
1419 SetStationTileBlocked(tile, flags.Test(StationSpec::TileFlag::Blocked));
1420 SetStationTileHavePylons(tile, flags.Test(StationSpec::TileFlag::Pylons));
1421 SetStationTileHaveWires(tile, !flags.Test(StationSpec::TileFlag::NoWires));
1422}
1423
1424/**
1425 * Build rail station

Callers 3

CmdBuildRailWaypointFunction · 0.85
CmdBuildRailStationFunction · 0.85
AfterLoadStationsFunction · 0.85

Calls 6

GetStationTileFlagsFunction · 0.85
GetStationGfxFunction · 0.85
SetStationTileBlockedFunction · 0.85
SetStationTileHavePylonsFunction · 0.85
SetStationTileHaveWiresFunction · 0.85
TestMethod · 0.80

Tested by

no test coverage detected