Enable setting semaphore/electric type of signals on bridges/tunnels.

This commit is contained in:
Jonathan G Rennison
2016-02-20 22:13:30 +00:00
parent 2b4dbf582a
commit 3861968765
3 changed files with 43 additions and 11 deletions

View File

@@ -225,4 +225,16 @@ static inline void SetTunnelBridgeExitGreen(TileIndex t, bool green)
SB(_me[t].m6, 0, 1, green ? 1 : 0);
}
static inline bool IsTunnelBridgeSemaphore(TileIndex t)
{
assert(IsTileType(t, MP_TUNNELBRIDGE) && HasWormholeSignals(t));
return HasBit(_me[t].m6, 1);
}
static inline void SetTunnelBridgeSemaphore(TileIndex t, bool is_semaphore)
{
assert(IsTileType(t, MP_TUNNELBRIDGE) && HasWormholeSignals(t));
SB(_me[t].m6, 1, 1, is_semaphore ? 1 : 0);
}
#endif /* TUNNELBRIDGE_MAP_H */