Enable bridge/tunnel exit signals to be one-way PBS.

Add signal conversion support.
This commit is contained in:
Jonathan G Rennison
2016-02-20 23:26:16 +00:00
parent 69c2cf352e
commit 35b93a42ac
6 changed files with 57 additions and 16 deletions

View File

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