Changeset - r17260:50146b881ad5
[Not reviewed]
master
0 1 0
planetmaker - 14 years ago 2011-02-07 20:45:31
planetmaker@openttd.org
(svn r22010) -Feature-ette [FS#4131]: [NewGRF] Test all possible industry layouts during construction and add another pony to andy's stables
1 file changed with 1 insertions and 5 deletions:
0 comments (0 inline, 0 general)
src/industry_cmd.cpp
Show inline comments
 
@@ -1782,20 +1782,16 @@ CommandCost CmdBuildIndustry(TileIndex t
 
		}
 
	} 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;
 
	}
 

	
0 comments (0 inline, 0 general)