(svn r4614) CodeChange : Cleanup of industry_cmd (Step-4).

Removing the _industry_type_costs in favor of IndustrySpec.cost_multiplier;
In order to let industry_gui use the GetIndustrySpec accessor,
some structs had to be moved in industry.h
This commit is contained in:
belugas
2006-04-28 21:58:16 +00:00
parent d039d332ec
commit 7ab8b20faf
5 changed files with 227 additions and 227 deletions

View File

@@ -122,7 +122,7 @@ IndustryType GetIndustryType(TileIndex tile)
* @param thistype of industry (which is the index in _industry_specs)
* @pre thistype < IT_END
**/
static const IndustrySpec *GetIndustrySpec(IndustryType thistype)
const IndustrySpec *GetIndustrySpec(IndustryType thistype)
{
assert(thistype < IT_END);
return &_industry_specs[thistype];
@@ -1433,7 +1433,7 @@ int32 CmdBuildIndustry(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (flags & DC_EXEC) DoCreateNewIndustry(i, tile, p1, it, t, OWNER_NONE);
return (_price.build_industry >> 5) * _industry_type_costs[p1];
return (_price.build_industry >> 5) * indspec->cost_multiplier;
}