Loading

Revision differences

Old revision #prelurdeqNew revision #p0mtkypys
1            } else {  1            } else {  
2                /* Clear the tiles, but do not affect town ratings */  2                if ((ind_behav & INDUSTRYBEH_BUILT_ONWATER) && _settings_game.construction.build_on_competitor_canal && IsWaterTile(cur_tile) && IsCanal(cur_tile)) {
3                CommandCost ret = DoCommand(cur_tile, 0, 0, DC_AUTO | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR);  3                    CommandCost ret = CheckTileOwnership(cur_tile);
   4                    if (ret.Failed() && GetTileOwner(cur_tile) >= MAX_COMPANIES) return ret;
   5                } else {
   6                    /* Clear the tiles, but do not affect town ratings */
   7                    CommandCost ret = DoCommand(cur_tile, 0, 0, DC_AUTO | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR);
4  8  
5                if (ret.Failed()) {  5                    if (ret.Failed()) return ret;
6                    if (!(ind_behav & INDUSTRYBEH_BUILT_ONWATER)) return ret;    
7    
8                    if (!_settings_game.construction.build_on_competitor_canal) return ret;    
9                    if (_settings_game.construction.build_on_competitor_canal && (ind_behav & INDUSTRYBEH_BUILT_ONWATER) && (IsTileType(cur_tile, MP_INDUSTRY) || _current_company >= MAX_COMPANIES)) return ret;    
10                }  10                }  
11            }  11            }
12        }