CvHomelandAI::PlotSSPartMoves()
- Defined in
- CvHomelandAI.cpp, line 2003
- Class
- CvHomelandAI
- Hook name
CivHooks::CvHomelandAI_PlotSSPartMoves
Hooks
static bool BeforeCvHomelandAI_PlotSSPartMoves(CvHomelandAI* self);static void AfterCvHomelandAI_PlotSSPartMoves(CvHomelandAI* self);static void ReplaceCvHomelandAI_PlotSSPartMoves(void (*original)(CvHomelandAI*), CvHomelandAI* self);CivRegisterBefore<CivHooks::CvHomelandAI_PlotSSPartMoves>(host, &BeforeCvHomelandAI_PlotSSPartMoves);CivRegisterAfter<CivHooks::CvHomelandAI_PlotSSPartMoves>(host, &AfterCvHomelandAI_PlotSSPartMoves);CivRegisterReplace<CivHooks::CvHomelandAI_PlotSSPartMoves>(host, &ReplaceCvHomelandAI_PlotSSPartMoves);
Code
2002/// Find moves for spaceship parts2003void CvHomelandAI::PlotSSPartMoves()2004{2005 ClearCurrentMoveUnits();20062007 // Loop through all recruited units2008 for(list<int>::iterator it = m_CurrentTurnUnits.begin(); it != m_CurrentTurnUnits.end(); ++it)2009 {2010 UnitHandle pUnit = m_pPlayer->getUnit(*it);2011 if(pUnit)2012 {2013 if(pUnit->AI_getUnitAIType() == UNITAI_SPACESHIP_PART)2014 {2015 CvHomelandUnit unit;2016 unit.SetID(pUnit->GetID());2017 m_CurrentMoveUnits.push_back(unit);2018 }2019 }2020 }20212022 if(m_CurrentMoveUnits.size() > 0)2023 {2024 ExecuteSSPartMoves();2025 }2026}
Calls
BaseVector::size- CvHomelandAI::ClearCurrentMoveUnits()
- CvHomelandAI::ExecuteSSPartMoves()
- CvHomelandUnit::CvHomelandUnit()
- CvHomelandUnit::SetID(int)
- CvPlayer::getUnit(int)
- CvUnit::AI_getUnitAIType() const
- CvUnit::GetID() const
FObjectHandle::FObjectHandleFObjectHandle::operator boolFObjectHandle::operator->FStaticVector::push_backstd::list::_Const_iterator::operator!=std::list::_Iterator::operator*std::list::_Iterator::operator++std::list::beginstd::list::end