(svn r21156) -Codechange: Introduce EconomyIsInRecession().

This commit is contained in:
alberth
2010-11-13 09:45:20 +00:00
parent aea8274dba
commit 43f807a918
5 changed files with 15 additions and 6 deletions

View File

@@ -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 */