summaryrefslogtreecommitdiff
path: root/src/industry.h
diff options
context:
space:
mode:
authorbelugas <belugas@openttd.org>2007-11-27 17:13:49 +0000
committerbelugas <belugas@openttd.org>2007-11-27 17:13:49 +0000
commitb10eea628d07bf69c22faa6a156c337b41c15276 (patch)
treeaca3c585347e4c3ad09d02252de1e3024066003f /src/industry.h
parent1682d5d6796505c7d87ab179cd7f95cccd31dd2c (diff)
downloadopenttd-b10eea628d07bf69c22faa6a156c337b41c15276.tar.xz
(svn r11534) -Feature(newgrf): Implement property 23h for Industries.
This will add a cost to the removal of an industry using the cheat magic bulldozer. Note that the removal of regular or newgrf industries without specified removal cost will have no cost applied to. This is a difference from original spec, where a default base cost is added.
Diffstat (limited to 'src/industry.h')
-rw-r--r--src/industry.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/industry.h b/src/industry.h
index 8036122a0..e633a4c86 100644
--- a/src/industry.h
+++ b/src/industry.h
@@ -161,7 +161,8 @@ struct GRFFileProps {
struct IndustrySpec {
const IndustryTileTable *const *table;///< List of the tiles composing the industry
byte num_table; ///< Number of elements in the table
- uint8 cost_multiplier; ///< Base cost multiplier.
+ uint8 cost_multiplier; ///< Base construction cost multiplier.
+ uint32 removal_cost_multiplier; ///< Base removal cost multiplier.
uint16 raw_industry_cost_multiplier; ///< Multiplier for the raw industries cost
uint32 prospecting_chance; ///< Chance prospecting succeeds
IndustryType conflicting[3]; ///< Industries this industry cannot be close to
@@ -202,6 +203,14 @@ struct IndustrySpec {
* @return the cost (inflation corrected etc)
*/
Money GetConstructionCost() const;
+
+ /**
+ * Get the cost for removing this industry
+ * Take note that the cost will always be zero for non-grf industries.
+ * Only if the grf author did specified a cost will it be applicable.
+ * @return the cost (inflation corrected etc)
+ */
+ Money GetRemovalCost() const;
};
/**