Cleanup #9725: Replace cmd_helper related functions and remove cmd_helper.h.

This commit is contained in:
J0anJosep
2022-01-08 12:01:37 +01:00
committed by Michael Lutz
parent 09b71c97aa
commit d9a37c915f
22 changed files with 60 additions and 74 deletions

View File

@@ -282,6 +282,17 @@ static inline bool HasTownOwnedRoad(TileIndex t)
return HasTileRoadType(t, RTT_ROAD) && IsRoadOwner(t, RTT_ROAD, OWNER_TOWN);
}
/**
* Checks if a DisallowedRoadDirections is valid.
*
* @param wc The value to check
* @return true if the given value is a valid DisallowedRoadDirections.
*/
static inline bool IsValidDisallowedRoadDirections(DisallowedRoadDirections drt)
{
return drt < DRD_END;
}
/**
* Gets the disallowed directions
* @param t the tile to get the directions from