Loading

Paste #pcom9fux3

  1. Index: src/lang/english.txt
  2. ===================================================================
  3. --- src/lang/english.txt    (revision 27203)
  4. +++ src/lang/english.txt    (working copy)
  5. @@ -1252,8 +1252,8 @@
  6.  STR_CONFIG_SETTING_PLANE_CRASHES_NORMAL                         :Normal
  7.  STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD                            :Allow drive-through road stops on town owned roads: {STRING2}
  8.  STR_CONFIG_SETTING_STOP_ON_TOWN_ROAD_HELPTEXT                   :Allow construction of drive-through road stops on town-owned roads
  9. -STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD                      :Allow drive-through road stops on roads owned by competitors: {STRING2}
  10. -STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT             :Allow construction of drive-through road stops on roads owned by other companies
  11. +STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD                      :Allow certain constructions on roads/canals owned by competitors: {STRING2}
  12. +STR_CONFIG_SETTING_STOP_ON_COMPETITOR_ROAD_HELPTEXT             :Allow construction of drive-through road stops on roads owned by other companies, and construction of locks on canals owned by other companies.
  13.  STR_CONFIG_SETTING_DYNAMIC_ENGINES_EXISTING_VEHICLES            :{WHITE}Changing this setting is not possible when there are vehicles
  14.  STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE                   :Infrastructure maintenance: {STRING2}
  15.  STR_CONFIG_SETTING_INFRASTRUCTURE_MAINTENANCE_HELPTEXT          :When enabled, infrastructure causes maintenance costs. The cost grows over-proportional with the network size, thus affecting bigger companies more than smaller ones
  16. Index: src/water_cmd.cpp
  17. ===================================================================
  18. --- src/water_cmd.cpp   (revision 27203)
  19. +++ src/water_cmd.cpp   (working copy)
  20. @@ -265,6 +265,16 @@
  21.     /* lower tile */
  22.     WaterClass wc_lower = IsWaterTile(tile - delta) ? GetWaterClass(tile - delta) : WATER_CLASS_CANAL;
  23.  
  24. +   if (!_settings_game.construction.road_stop_on_competitor_road && HasTileWaterClass(tile - delta) && GetWaterClass(tile - delta) == WATER_CLASS_CANAL) { // Skip if it's not canal
  25. +       if (!IsTileType(tile - delta, MP_INDUSTRY)) {
  26. +           Owner o_lower = GetTileOwner(tile - delta);
  27. +           if (o_lower != OWNER_NONE) { // Skip if canal owner is none
  28. +               ret = CheckTileOwnership(tile - delta);
  29. +               if (ret.Failed()) return ret;
  30. +           }
  31. +       }
  32. +   }
  33. +
  34.     if (!IsWaterTile(tile - delta)) {
  35.         ret = DoCommand(tile - delta, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
  36.         if (ret.Failed()) return ret;
  37. @@ -278,6 +288,16 @@
  38.     /* upper tile */
  39.     WaterClass wc_upper = IsWaterTile(tile + delta) ? GetWaterClass(tile + delta) : WATER_CLASS_CANAL;
  40.  
  41. +   if (!_settings_game.construction.road_stop_on_competitor_road && HasTileWaterClass(tile + delta) && GetWaterClass(tile + delta) == WATER_CLASS_CANAL) { // Skip if it's not canal
  42. +       if (!IsTileType(tile + delta, MP_INDUSTRY)) {
  43. +           Owner o_upper = GetTileOwner(tile + delta);
  44. +           if (o_upper != OWNER_NONE) { // Skip if canal owner is none
  45. +               ret = CheckTileOwnership(tile + delta);
  46. +               if (ret.Failed()) return ret;
  47. +           }
  48. +       }
  49. +   }
  50. +
  51.     if (!IsWaterTile(tile + delta)) {
  52.         ret = DoCommand(tile + delta, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
  53.         if (ret.Failed()) return ret;

Comments