From 6aaa72c9188f5c653c98258c590f377aff6cb1eb Mon Sep 17 00:00:00 2001 From: rubidium Date: Sun, 9 Dec 2007 18:51:25 +0000 Subject: (svn r11609) -Fix [FS#1524]: wrong error messages were shown when trying to build some industries in the scenario editor. --- src/industry_cmd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/industry_cmd.cpp') diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 84a321757..c400cb33b 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1236,9 +1236,9 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable refused_slope |= IsSlopeRefused(tileh, its->slopes_refused); } - if (ind_behav & (INDUSTRYBEH_ONLY_INTOWN | INDUSTRYBEH_TOWN1200_MORE)) { + if (ind_behav & (INDUSTRYBEH_ONLY_INTOWN)) { if (!IsTileType(cur_tile, MP_HOUSE)) { - _error_message = STR_029D_CAN_ONLY_BE_BUILT_IN_TOWNS; + _error_message = STR_030D_CAN_ONLY_BE_BUILT_IN_TOWNS; return false; } if (CmdFailed(DoCommand(cur_tile, 0, 0, 0, CMD_LANDSCAPE_CLEAR))) return false; @@ -1253,7 +1253,7 @@ static bool CheckIfIndustryTilesAreFree(TileIndex tile, const IndustryTileTable /* It is almost impossible to have a fully flat land in TG, so what we * do is that we check if we can make the land flat later on. See * CheckIfCanLevelIndustryPlatform(). */ - return !refused_slope || (_patches.land_generator == LG_TERRAGENESIS && _generating_world && !custom_shape); + return !refused_slope || (_patches.land_generator == LG_TERRAGENESIS && _generating_world && !custom_shape && !_ignore_restrictions); } static bool CheckIfIndustryIsAllowed(TileIndex tile, int type, const Town *t) @@ -1558,7 +1558,7 @@ static Industry *CreateNewIndustryHelper(TileIndex tile, IndustryType type, uint if (!_check_new_industry_procs[indspec->check_proc](tile)) return NULL; } - if (!custom_shape_check && _patches.land_generator == LG_TERRAGENESIS && _generating_world && !CheckIfCanLevelIndustryPlatform(tile, 0, it, type)) return NULL; + if (!custom_shape_check && _patches.land_generator == LG_TERRAGENESIS && _generating_world && !_ignore_restrictions && !CheckIfCanLevelIndustryPlatform(tile, 0, it, type)) return NULL; if (!CheckIfTooCloseToIndustry(tile, type)) return NULL; const Town *t = CheckMultipleIndustryInTown(tile, type); -- cgit v1.2.3-54-g00ecf