summaryrefslogtreecommitdiff
path: root/src/unmovable.h
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-02 20:12:02 +0000
committerrubidium <rubidium@openttd.org>2010-08-02 20:12:02 +0000
commit00dcb16760d7794df9d9cbada6416d65ea51911b (patch)
tree4bfa2beddb9c72208dbe3e31c3894cbae33530af /src/unmovable.h
parent9f5e49eaad356d7166dfd00aff1d6666f053523c (diff)
downloadopenttd-00dcb16760d7794df9d9cbada6416d65ea51911b.tar.xz
(svn r20316) -Document: some members/structs and functions and rename some slightly to better catch their meaning
Diffstat (limited to 'src/unmovable.h')
-rw-r--r--src/unmovable.h23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/unmovable.h b/src/unmovable.h
index 0940ce691..dae1c269b 100644
--- a/src/unmovable.h
+++ b/src/unmovable.h
@@ -17,14 +17,23 @@
void UpdateCompanyHQ(Company *c, uint score);
+/** An (unmovable) object that isn't use for transport, industries or houses. */
struct UnmovableSpec {
- StringID name;
- uint8 buy_cost_multiplier;
- uint8 sell_cost_multiplier;
-
- Money GetRemovalCost() const { return (_price[PR_CLEAR_UNMOVABLE] * this->sell_cost_multiplier); }
- Money GetBuildingCost() const { return (_price[PR_BUILD_UNMOVABLE] * this->buy_cost_multiplier); }
-
+ StringID name; ///< The name for this object.
+ uint8 build_cost_multiplier; ///< Build cost multiplier per tile.
+ uint8 clear_cost_multiplier; ///< Clear cost multiplier per tile.
+
+ /**
+ * Get the cost for building a structure of this type.
+ * @return The cost for building.
+ */
+ Money GetBuildCost() const { return (_price[PR_BUILD_UNMOVABLE] * this->build_cost_multiplier); }
+
+ /**
+ * Get the cost for clearing a structure of this type.
+ * @return The cost for clearing.
+ */
+ Money GetClearCost() const { return (_price[PR_CLEAR_UNMOVABLE] * this->clear_cost_multiplier); }
};