Codechange: Make TownRatingCheckType an enum class. (#14652)
This commit is contained in:
+2
-2
@@ -282,7 +282,7 @@ CommandCost CheckAllowRemoveRoad(TileIndex tile, RoadBits remove, Owner owner, R
|
||||
|
||||
/* check if you're allowed to remove the street owned by a town
|
||||
* removal allowance depends on difficulty setting */
|
||||
CommandCost ret = CheckforTownRating(flags, t, ROAD_REMOVE);
|
||||
CommandCost ret = CheckforTownRating(flags, t, TownRatingCheckType::RoadRemove);
|
||||
if (ret.Failed()) return ret;
|
||||
|
||||
/* Get a bitmask of which neighbouring roads has a tile */
|
||||
@@ -2492,7 +2492,7 @@ CommandCost CmdConvertRoad(DoCommandFlags flags, TileIndex tile, TileIndex area_
|
||||
* acceptance of destructive actions. */
|
||||
if (owner == OWNER_TOWN) {
|
||||
Town *t = ClosestTownFromTile(tile, _settings_game.economy.dist_local_authority);
|
||||
CommandCost ret = CheckforTownRating({}, t, tt == MP_TUNNELBRIDGE ? TUNNELBRIDGE_REMOVE : ROAD_REMOVE);
|
||||
CommandCost ret = CheckforTownRating({}, t, tt == MP_TUNNELBRIDGE ? TownRatingCheckType::TunnelBridgeRemove : TownRatingCheckType::RoadRemove);
|
||||
if (ret.Failed()) {
|
||||
error = std::move(ret);
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user