CvPlayer::calculateEconomicMight() const
- Defined in
- CvPlayer.cpp, line 17035
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_calculateEconomicMight
Hooks
static bool BeforeCvPlayer_calculateEconomicMight(const CvPlayer* self, int& result);static void AfterCvPlayer_calculateEconomicMight(const CvPlayer* self, int& result);static int ReplaceCvPlayer_calculateEconomicMight(int (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_calculateEconomicMight>(host, &BeforeCvPlayer_calculateEconomicMight);CivRegisterAfter<CivHooks::CvPlayer_calculateEconomicMight>(host, &AfterCvPlayer_calculateEconomicMight);CivRegisterReplace<CivHooks::CvPlayer_calculateEconomicMight>(host, &ReplaceCvPlayer_calculateEconomicMight);
Code
17035int CvPlayer::calculateEconomicMight() const17036{17037 // Default to 5 so that a fluctuation in Population early doesn't swing things wildly17038 int iEconomicMight = 5;1703917040 iEconomicMight += getTotalPopulation();1704117042 // todo: add weights to these in an xml17043 //iEconomicMight += calculateTotalYield(YIELD_FOOD);17044 iEconomicMight += calculateTotalYield(YIELD_PRODUCTION);17045 //iEconomicMight += calculateTotalYield(YIELD_SCIENCE);17046 iEconomicMight += calculateTotalYield(YIELD_GOLD);17047 //iEconomicMight += calculateTotalYield(YIELD_CULTURE);17048 //iEconomicMight += calculateTotalYield(YIELD_FAITH);17049#if defined(MOD_API_UNIFIED_YIELDS_TOURISM)17050 //iEconomicMight += calculateTotalYield(YIELD_TOURISM);17051#endif17052#if defined(MOD_API_UNIFIED_YIELDS_GOLDEN_AGE)17053 //iEconomicMight += calculateTotalYield(YIELD_GOLDEN_AGE_POINTS);17054#endif1705517056 return iEconomicMight;17057}