CvPlayer::isTurnDone() const
- Defined in
- CvPlayer.cpp, line 18257
- Class
- CvPlayer
- Hook name
CivHooks::CvPlayer_isTurnDone
Hooks
static bool BeforeCvPlayer_isTurnDone(const CvPlayer* self, bool& result);static void AfterCvPlayer_isTurnDone(const CvPlayer* self, bool& result);static bool ReplaceCvPlayer_isTurnDone(bool (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_isTurnDone>(host, &BeforeCvPlayer_isTurnDone);CivRegisterAfter<CivHooks::CvPlayer_isTurnDone>(host, &AfterCvPlayer_isTurnDone);CivRegisterReplace<CivHooks::CvPlayer_isTurnDone>(host, &ReplaceCvPlayer_isTurnDone);
Code
18257bool CvPlayer::isTurnDone() const18258{18259 // if this returns true, popups and diplomacy will wait to appear until next turn18260 if(!GC.getGame().isPbem() && !GC.getGame().isHotSeat())18261 {18262 return false;18263 }18264 if(!isHuman())18265 {18266 return true;18267 }18268 if(!isEndTurn())18269 {18270 return false;18271 }18272 return (!isAutoMoves());18273}