summaryrefslogtreecommitdiff
path: root/src/economy_func.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/economy_func.h')
-rw-r--r--src/economy_func.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/economy_func.h b/src/economy_func.h
index dfeefbb9c..e9c9c170d 100644
--- a/src/economy_func.h
+++ b/src/economy_func.h
@@ -42,4 +42,13 @@ void InitializeEconomy();
void RecomputePrices();
void AddInflation(bool check_year = true);
+/**
+ * Is the economy in recession?
+ * @return \c True if economy is in recession, \c false otherwise.
+ */
+static inline bool EconomyIsInRecession()
+{
+ return _economy.fluct <= 0;
+}
+
#endif /* ECONOMY_FUNC_H */