summaryrefslogtreecommitdiff
path: root/industry_cmd.c
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2006-04-28 21:58:16 +0000
committerbelugas <belugas@openttd.org>2006-04-28 21:58:16 +0000
commit7ab8b20faf44696e276d3a15836df08bf21c7d3d (patch)
tree7a33e83753c8db062e024e30635d1349dc2275df /industry_cmd.c
parentd039d332ecbb96186249208e5692f900ef2ec07e (diff)
downloadopenttd-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.c4
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;
}