diff options
author | belugas <belugas@openttd.org> | 2006-04-28 21:58:16 +0000 |
---|---|---|
committer | belugas <belugas@openttd.org> | 2006-04-28 21:58:16 +0000 |
commit | 7ab8b20faf44696e276d3a15836df08bf21c7d3d (patch) | |
tree | 7a33e83753c8db062e024e30635d1349dc2275df /industry_cmd.c | |
parent | d039d332ecbb96186249208e5692f900ef2ec07e (diff) | |
download | openttd-7ab8b20faf44696e276d3a15836df08bf21c7d3d.tar.xz |
(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
Diffstat (limited to 'industry_cmd.c')
-rw-r--r-- | industry_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/industry_cmd.c b/industry_cmd.c index 80840d376..1a4c96209 100644 --- a/industry_cmd.c +++ b/industry_cmd.c @@ -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; } |