Bazaar developer reference

CvPlayer::IsEmpireSuperUnhappy() const

Defined in
CvPlayer.cpp, line 11559
Class
CvPlayer
Hook name
CivHooks::CvPlayer_IsEmpireSuperUnhappy

Hooks

static bool BeforeCvPlayer_IsEmpireSuperUnhappy(const CvPlayer* self, bool& result);static void AfterCvPlayer_IsEmpireSuperUnhappy(const CvPlayer* self, bool& result);static bool ReplaceCvPlayer_IsEmpireSuperUnhappy(bool (*original)(const CvPlayer*), const CvPlayer* self);CivRegisterBefore<CivHooks::CvPlayer_IsEmpireSuperUnhappy>(host, &BeforeCvPlayer_IsEmpireSuperUnhappy);CivRegisterAfter<CivHooks::CvPlayer_IsEmpireSuperUnhappy>(host, &AfterCvPlayer_IsEmpireSuperUnhappy);CivRegisterReplace<CivHooks::CvPlayer_IsEmpireSuperUnhappy>(host, &ReplaceCvPlayer_IsEmpireSuperUnhappy);

Code

11558/// Is the empire SUPER unhappy? (leads to revolts)11559bool CvPlayer::IsEmpireSuperUnhappy() const11560{11561	if(GC.getGame().isOption(GAMEOPTION_NO_HAPPINESS))11562	{11563		return false;11564	}1156511566	if(GetExcessHappiness() <= /*-20*/ GC.getSUPER_UNHAPPY_THRESHOLD())11567	{11568		return true;11569	}1157011571	return false;11572}

Calls

Called by