CvDiplomacyAI::LogGrandStrategy(CvString &)
- Defined in
- CvDiplomacyAI.cpp, line 27037
- Class
- CvDiplomacyAI
- Hook name
CivHooks::CvDiplomacyAI_LogGrandStrategy
Hooks
static bool BeforeCvDiplomacyAI_LogGrandStrategy(CvDiplomacyAI* self, CvString& strString);static void AfterCvDiplomacyAI_LogGrandStrategy(CvDiplomacyAI* self, CvString& strString);static void ReplaceCvDiplomacyAI_LogGrandStrategy(void (*original)(CvDiplomacyAI*, CvString&), CvDiplomacyAI* self, CvString& strString);CivRegisterBefore<CivHooks::CvDiplomacyAI_LogGrandStrategy>(host, &BeforeCvDiplomacyAI_LogGrandStrategy);CivRegisterAfter<CivHooks::CvDiplomacyAI_LogGrandStrategy>(host, &AfterCvDiplomacyAI_LogGrandStrategy);CivRegisterReplace<CivHooks::CvDiplomacyAI_LogGrandStrategy>(host, &ReplaceCvDiplomacyAI_LogGrandStrategy);
Code
27036/// Log Grand Strategy27037void CvDiplomacyAI::LogGrandStrategy(CvString& strString)27038{27039 CvString strTemp;2704027041 AIGrandStrategyTypes eGrandStrategy =GetPlayer()->GetGrandStrategyAI()->GetActiveGrandStrategy();2704227043 if(eGrandStrategy == GC.getInfoTypeForString("AIGRANDSTRATEGY_CONQUEST"))27044 {27045 strTemp.Format("WC");27046 }27047 else if(eGrandStrategy == GC.getInfoTypeForString("AIGRANDSTRATEGY_SPACESHIP"))27048 {27049 strTemp.Format("Spaceship");27050 }27051 else if(eGrandStrategy == GC.getInfoTypeForString("AIGRANDSTRATEGY_UNITED_NATIONS"))27052 {27053 strTemp.Format("Diplomacy");27054 }27055 else if(eGrandStrategy == GC.getInfoTypeForString("AIGRANDSTRATEGY_CULTURE"))27056 {27057 strTemp.Format("Culture");27058 }2705927060 strString += ", " + strTemp;27061}
Calls
- CvDiplomacyAI::GetPlayer()
- CvGlobals::getInfoTypeForString(const char *, bool) const
- CvGrandStrategyAI::GetActiveGrandStrategy() const
- CvPlayer::GetGrandStrategyAI() const
CvString::CvStringCvString::Formatstd::basic_string::operator+=std::operator+