CvMilitaryAI::LogMilitarySummaryMessage(const CvString &)
- Defined in
- CvMilitaryAI.cpp, line 4449
- Class
- CvMilitaryAI
- Hook name
CivHooks::CvMilitaryAI_LogMilitarySummaryMessage
Hooks
static bool BeforeCvMilitaryAI_LogMilitarySummaryMessage(CvMilitaryAI* self, const CvString& strMsg);static void AfterCvMilitaryAI_LogMilitarySummaryMessage(CvMilitaryAI* self, const CvString& strMsg);static void ReplaceCvMilitaryAI_LogMilitarySummaryMessage(void (*original)(CvMilitaryAI*, const CvString&), CvMilitaryAI* self, const CvString& strMsg);CivRegisterBefore<CivHooks::CvMilitaryAI_LogMilitarySummaryMessage>(host, &BeforeCvMilitaryAI_LogMilitarySummaryMessage);CivRegisterAfter<CivHooks::CvMilitaryAI_LogMilitarySummaryMessage>(host, &AfterCvMilitaryAI_LogMilitarySummaryMessage);CivRegisterReplace<CivHooks::CvMilitaryAI_LogMilitarySummaryMessage>(host, &ReplaceCvMilitaryAI_LogMilitarySummaryMessage);
Code
4448/// Log a message to the high-level summary log4449void CvMilitaryAI::LogMilitarySummaryMessage(const CvString& strMsg)4450{4451 if(GC.getLogging() && GC.getAILogging())4452 {4453 CvString strOutBuf;4454 CvString strBaseString;4455 CvString strPlayerName = m_pPlayer->getCivilizationShortDescription();4456 FILogFile* pLog = LOGFILEMGR.GetLog(GetLogFileName(strPlayerName, true/*bSummary*/), FILogFile::kDontTimeStamp);44574458 // Get the leading info for this line4459 strBaseString.Format("%03d, ", GC.getGame().getElapsedGameTurns());4460 strBaseString += strPlayerName + ", ";4461 strOutBuf = strBaseString + strMsg;4462 pLog->Msg(strOutBuf);4463 }4464}
Calls
- CvGame::getElapsedGameTurns() const
- CvGlobals::getAILogging()
- CvGlobals::getGame()
- CvGlobals::getLogging()
- CvMilitaryAI::GetLogFileName(CvString &, bool) const
- CvPlayer::getCivilizationShortDescription() const
CvString::CvStringCvString::CvStringCvString::FormatCvString::operator const char *CvString::operator=FILogFile::MsgFILogFileMgr::GetInstanceFILogFileMgr::GetLogstd::basic_string::operator+=std::operator+std::operator+
Called by
- CvAIOperation::LogOperationEnd()
- CvAIOperation::LogOperationStart()
- CvMilitaryAI::LogCityCaptured(CvCity *, PlayerTypes)
- CvMilitaryAI::LogCityRazed(CvCity *, PlayerTypes)
- CvMilitaryAI::LogCivilizationDestroyed()
- CvMilitaryAI::LogDeclarationOfWar(PlayerTypes)
- CvMilitaryAI::LogPeace(PlayerTypes)
- CvMilitaryAI::LogPeace(TeamTypes)