diff --git a/src/road_cmd.cpp b/src/road_cmd.cpp --- a/src/road_cmd.cpp +++ b/src/road_cmd.cpp @@ -182,7 +182,7 @@ bool CheckAllowRemoveRoad(TileIndex tile * then allow it */ if (KillFirstBit(n) != ROAD_NONE && (n & remove) != ROAD_NONE) { /* you can remove all kind of roads with extra dynamite */ - if (!_patches.extra_dynamite) { + if (!_settings.construction.extra_dynamite) { SetDParam(0, t->index); _error_message = STR_2009_LOCAL_AUTHORITY_REFUSES; return false; @@ -279,7 +279,7 @@ static CommandCost RemoveRoad(TileIndex * @li if build on slopes is disabled */ if (IsSteepSlope(tileh) || (IsStraightRoad(other) && (other & _invalid_tileh_slopes_road[0][tileh & SLOPE_ELEVATED]) != ROAD_NONE) || - (tileh != SLOPE_FLAT && !_patches.build_on_slopes)) { + (tileh != SLOPE_FLAT && !_settings.construction.build_on_slopes)) { pieces |= MirrorRoadBits(pieces); } @@ -419,7 +419,7 @@ static CommandCost CheckRoadSlope(Slope RoadBits type_bits = existing | *pieces; /* Roads on slopes */ - if (_patches.build_on_slopes && (_invalid_tileh_slopes_road[0][tileh] & (other | type_bits)) == ROAD_NONE) { + if (_settings.construction.build_on_slopes && (_invalid_tileh_slopes_road[0][tileh] & (other | type_bits)) == ROAD_NONE) { /* If we add leveling we've got to pay for it */ if ((other | existing) == ROAD_NONE) return CommandCost(EXPENSES_CONSTRUCTION, _price.terraform); @@ -439,7 +439,7 @@ static CommandCost CheckRoadSlope(Slope if (IsSlopeWithOneCornerRaised(tileh)) { /* Prevent build on slopes if it isn't allowed */ - if (_patches.build_on_slopes) { + if (_settings.construction.build_on_slopes) { /* If we add foundation we've got to pay for it */ if ((other | existing) == ROAD_NONE) return CommandCost(EXPENSES_CONSTRUCTION, _price.terraform); @@ -594,7 +594,7 @@ do_clear:; CommandCost ret = CheckRoadSlope(tileh, &pieces, existing, other_bits); /* Return an error if we need to build a foundation (ret != 0) but the * current patch-setting is turned off (or stupid AI@work) */ - if (CmdFailed(ret) || (ret.GetCost() != 0 && !_patches.build_on_slopes)) { + if (CmdFailed(ret) || (ret.GetCost() != 0 && !_settings.construction.build_on_slopes)) { return_cmd_error(STR_1000_LAND_SLOPED_IN_WRONG_DIRECTION); } cost.AddCost(ret); @@ -849,7 +849,7 @@ CommandCost CmdBuildRoadDepot(TileIndex Slope tileh = GetTileSlope(tile, NULL); if (tileh != SLOPE_FLAT && ( - !_patches.build_on_slopes || + !_settings.construction.build_on_slopes || IsSteepSlope(tileh) || !CanBuildDepotByTileh(dir, tileh) )) { @@ -1359,7 +1359,7 @@ static void TileLoop_Road(TileIndex tile } else if (IncreaseRoadWorksCounter(tile)) { TerminateRoadWorks(tile); - if (_patches.mod_road_rebuild) { + if (_settings.economy.mod_road_rebuild) { /* Generate a nicer town surface */ const RoadBits old_rb = GetAnyRoadBits(tile, ROADTYPE_ROAD); const RoadBits new_rb = CleanUpRoadBits(tile, old_rb); @@ -1570,7 +1570,7 @@ static void ChangeTileOwner_Road(TileInd static CommandCost TerraformTile_Road(TileIndex tile, uint32 flags, uint z_new, Slope tileh_new) { - if (_patches.build_on_slopes && AutoslopeEnabled()) { + if (_settings.construction.build_on_slopes && AutoslopeEnabled()) { switch (GetRoadTileType(tile)) { case ROAD_TILE_CROSSING: if (!IsSteepSlope(tileh_new) && (GetTileMaxZ(tile) == z_new + GetSlopeMaxZ(tileh_new)) && HasBit(VALID_LEVEL_CROSSING_SLOPES, tileh_new)) return CommandCost(EXPENSES_CONSTRUCTION, _price.terraform);