summaryrefslogtreecommitdiff
path: root/src/subsidy_base.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/subsidy_base.h')
-rw-r--r--src/subsidy_base.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/subsidy_base.h b/src/subsidy_base.h
index aaba0fea5..adb03f83b 100644
--- a/src/subsidy_base.h
+++ b/src/subsidy_base.h
@@ -18,6 +18,15 @@ struct Subsidy {
uint16 to; ///< Index of destination. Either TownID, IndustryID or StationID, when awarded
/**
+ * Tests whether this subsidy has been awarded to someone
+ * @return is this subsidy awarded?
+ */
+ FORCEINLINE bool IsAwarded() const
+ {
+ return this->age >= 12;
+ }
+
+ /**
* Determines index of this subsidy
* @return index (in the Subsidy::array array)
*/