Codechange: make FloodingBehaviour a scoped enum (#15632)

This commit is contained in:
Peter Nelson
2026-05-31 06:07:05 +01:00
committed by GitHub
parent 2ff631caa2
commit 0d2aed3b87
3 changed files with 20 additions and 20 deletions
+1 -1
View File
@@ -391,7 +391,7 @@ Foundation GetRailFoundation(Slope tileh, TrackBits bits)
static CommandCost CheckRailSlope(Slope tileh, TrackBits rail_bits, TrackBits existing, TileIndex tile)
{
/* don't allow building on the lower side of a coast */
if (GetFloodingBehaviour(tile) != FLOOD_NONE) {
if (GetFloodingBehaviour(tile) != FloodingBehaviour::None) {
if (!IsSteepSlope(tileh) && ((~_valid_tracks_on_leveled_foundation[tileh] & (rail_bits | existing)) != 0)) return CommandCost(STR_ERROR_CAN_T_BUILD_ON_WATER);
}