mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-11-17 21:25:40 +00:00
Fix not being able to build water industries when removing water is disabled
This commit is contained in:
parent
90ff178401
commit
a69a0b1557
@ -1423,7 +1423,9 @@ static CommandCost CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTil
|
||||
if (ret.Failed()) return ret;
|
||||
} else {
|
||||
/* Clear the tiles, but do not affect town ratings */
|
||||
CommandCost ret = DoCommand(cur_tile, 0, 0, DC_AUTO | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING, CMD_LANDSCAPE_CLEAR);
|
||||
DoCommandFlag flags = DC_AUTO | DC_NO_TEST_TOWN_RATING | DC_NO_MODIFY_TOWN_RATING;
|
||||
if ((ind_behav & INDUSTRYBEH_BUILT_ONWATER) && IsWaterTile(cur_tile)) flags |= DC_ALLOW_REMOVE_WATER;
|
||||
CommandCost ret = DoCommand(cur_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
||||
|
||||
if (ret.Failed()) return ret;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user