CvHomelandAI::LogHomelandMessage(CvString &)
- Defined in
- CvHomelandAI.cpp, line 5904
- Class
- CvHomelandAI
- Hook name
CivHooks::CvHomelandAI_LogHomelandMessage
Hooks
static bool BeforeCvHomelandAI_LogHomelandMessage(CvHomelandAI* self, CvString& strMsg);static void AfterCvHomelandAI_LogHomelandMessage(CvHomelandAI* self, CvString& strMsg);static void ReplaceCvHomelandAI_LogHomelandMessage(void (*original)(CvHomelandAI*, CvString&), CvHomelandAI* self, CvString& strMsg);CivRegisterBefore<CivHooks::CvHomelandAI_LogHomelandMessage>(host, &BeforeCvHomelandAI_LogHomelandMessage);CivRegisterAfter<CivHooks::CvHomelandAI_LogHomelandMessage>(host, &AfterCvHomelandAI_LogHomelandMessage);CivRegisterReplace<CivHooks::CvHomelandAI_LogHomelandMessage>(host, &ReplaceCvHomelandAI_LogHomelandMessage);
Code
5902/// Find the plot where we want to pillage5903/// Log current status of the operation5904void CvHomelandAI::LogHomelandMessage(CvString& strMsg)5905{5906 if(GC.getLogging() && GC.getAILogging())5907 {5908 CvString strOutBuf;5909 CvString strBaseString;5910 CvString strTemp, szTemp2;5911 CvString strPlayerName;5912 FILogFile* pLog;59135914 strPlayerName = m_pPlayer->getCivilizationShortDescription();5915 pLog = LOGFILEMGR.GetLog(GetLogFileName(strPlayerName), FILogFile::kDontTimeStamp);59165917 // Get the leading info for this line5918 strBaseString.Format("%03d, ", GC.getGame().getElapsedGameTurns());5919 strBaseString += strPlayerName + ", ";5920 strOutBuf = strBaseString + strMsg;5921 pLog->Msg(strOutBuf);5922 }5923}
Calls
- CvGame::getElapsedGameTurns() const
- CvGlobals::getAILogging()
- CvGlobals::getGame()
- CvGlobals::getLogging()
- CvHomelandAI::GetLogFileName(CvString &) const
- CvPlayer::getCivilizationShortDescription() const
CvString::CvStringCvString::FormatCvString::operator const char *CvString::operator=CvString::operator=FILogFile::MsgFILogFileMgr::GetInstanceFILogFileMgr::GetLogstd::basic_string::operator+=std::operator+std::operator+
Called by
45 functions in 6 files
- CvBeliefHelpers::ConvertBarbarianUnit(const CvUnit *, UnitHandle)
- CvCity::CreateUnit(UnitTypes, UnitAITypes, bool)
- CvEconomicAI::DisbandLongObsoleteUnits()
- CvEconomicAI::DoHurry()
- CvEconomicAI::DoPlotPurchases()
- CvEconomicAI::DoReconState()
- CvEconomicAI::LogScrapUnit(UnitHandle, int, int, int, int)
- CvHomelandAI::ExecuteAdmiralMoves()
- CvHomelandAI::ExecuteAircraftInterceptions()
- CvHomelandAI::ExecuteAircraftMoves()
- CvHomelandAI::ExecuteArchaeologistMoves()
- CvHomelandAI::ExecuteArtistMoves()
- CvHomelandAI::ExecuteCultureBlast(CvUnit *)
- CvHomelandAI::ExecuteEngineerMoves()
- CvHomelandAI::ExecuteExplorerMoves()
- CvHomelandAI::ExecuteFirstTurnSettlerMoves()
- CvHomelandAI::ExecuteGeneralMoves()
- CvHomelandAI::ExecuteGoldenAgeMove(CvUnit *)
- CvHomelandAI::ExecuteInquisitorMoves()
- CvHomelandAI::ExecuteMissionaryMoves()
- CvHomelandAI::ExecuteMovesToSafestPlot()
- CvHomelandAI::ExecuteMusicianMoves()
- CvHomelandAI::ExecuteProphetMoves()
- CvHomelandAI::ExecuteSSPartAdds()
- CvHomelandAI::ExecuteSSPartMoves()
- CvHomelandAI::ExecuteScientistMoves()
- CvHomelandAI::ExecuteSpecialExploreMove(CvUnit *, CvPlot *)
- CvHomelandAI::ExecuteTradeUnitMoves()
- CvHomelandAI::ExecuteTreasureMoves()
- CvHomelandAI::ExecuteWriterMoves()
- CvHomelandAI::MoveCivilianToSafety(CvUnit *, bool, bool)
- CvHomelandAI::PlotAirliftMoves()
- CvHomelandAI::PlotAncientRuinMoves()
- CvHomelandAI::PlotGarrisonMoves(bool)
- CvHomelandAI::PlotHealMoves()
- CvHomelandAI::PlotMobileReserveMoves()
- CvHomelandAI::PlotPatrolMoves()
- CvHomelandAI::PlotSentryMoves()
- CvHomelandAI::PlotUpgradeMoves()
- CvHomelandAI::PlotWorkerSeaMoves()
- CvHomelandAI::ReviewUnassignedUnits()
- CvPlayerTraits::ConvertBarbarianCamp(CvUnit *, CvPlot *)
- CvPlayerTraits::ConvertBarbarianNavalUnit(CvUnit *, UnitHandle)
- CvUnit::jumpToNearestValidPlot()
- CvUnit::jumpToNearestValidPlotWithinRange(int)