diff options
author | planetmaker <planetmaker@openttd.org> | 2011-02-07 20:45:31 +0000 |
---|---|---|
committer | planetmaker <planetmaker@openttd.org> | 2011-02-07 20:45:31 +0000 |
commit | 64280e63fbfc36fd01f06ca3b8948d10db80c742 (patch) | |
tree | 9a7130478752ad3cbd2a1f7ef99bcd58423cb3ca | |
parent | 28a72bbf4720db1cce96fad75210adff914c4ea3 (diff) | |
download | openttd-64280e63fbfc36fd01f06ca3b8948d10db80c742.tar.xz |
(svn r22010) -Feature-ette [FS#4131]: [NewGRF] Test all possible industry layouts during construction and add another pony to andy's stables
-rw-r--r-- | src/industry_cmd.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index a11974e87..406ee085a 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1782,20 +1782,16 @@ CommandCost CmdBuildIndustry(TileIndex tile, DoCommandFlag flags, uint32 p1, uin } } else { int count = indspec->num_table; - const IndustryTileTable * const *itt = indspec->table; int num = GB(p1, 8, 8); if (num >= count) return CMD_ERROR; CommandCost ret = CommandCost(STR_ERROR_SITE_UNSUITABLE); - SmallVector<ClearedObjectArea, 1> object_areas(_cleared_object_areas); do { if (--count < 0) return ret; if (--num < 0) num = indspec->num_table - 1; - ret = CheckIfIndustryTilesAreFree(tile, itt[num], num, it, random_initial_bits, _current_company, IACT_USERCREATION); - _cleared_object_areas = object_areas; + ret = CreateNewIndustryHelper(tile, it, flags, indspec, num, random_var8f, random_initial_bits, _current_company, IACT_USERCREATION, &ind); } while (ret.Failed()); - ret = CreateNewIndustryHelper(tile, it, flags, indspec, num, random_var8f, random_initial_bits, _current_company, IACT_USERCREATION, &ind); if (ret.Failed()) return ret; } |