diff options
author | rubidium <rubidium@openttd.org> | 2007-12-09 18:51:25 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-12-09 18:51:25 +0000 |
commit | 6aaa72c9188f5c653c98258c590f377aff6cb1eb (patch) | |
tree | 7bb8c5251984f5cf1544bba970237e8e5afb6f89 /src/industry_cmd.cpp | |
parent | c3ea7e4dc455e0b427c5d00fb2fa9ef31f2c80ac (diff) | |
download | openttd-6aaa72c9188f5c653c98258c590f377aff6cb1eb.tar.xz |
(svn r11609) -Fix [FS#1524]: wrong error messages were shown when trying to build some industries in the scenario editor.
Diffstat (limited to 'src/industry_cmd.cpp')
-rw-r--r-- | src/industry_cmd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); |