Bazaar developer reference

CvLuaGame::lGetNumReligionsFounded(lua_State *)

Defined in
Lua/CvLuaGame.cpp, line 2483
Class
CvLuaGame
Hook name
CivHooks::CvLuaGame_lGetNumReligionsFounded

Hooks

static bool BeforeCvLuaGame_lGetNumReligionsFounded(lua_State* L, int& result);static void AfterCvLuaGame_lGetNumReligionsFounded(lua_State* L, int& result);static int ReplaceCvLuaGame_lGetNumReligionsFounded(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lGetNumReligionsFounded>(host, &BeforeCvLuaGame_lGetNumReligionsFounded);CivRegisterAfter<CivHooks::CvLuaGame_lGetNumReligionsFounded>(host, &AfterCvLuaGame_lGetNumReligionsFounded);CivRegisterReplace<CivHooks::CvLuaGame_lGetNumReligionsFounded>(host, &ReplaceCvLuaGame_lGetNumReligionsFounded);

Code

2483int CvLuaGame::lGetNumReligionsFounded(lua_State* L)2484{2485	int iRtnValue;2486#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_RELIGION_LOCAL_RELIGIONS)2487	const bool bIgnoreLocal	= luaL_optint(L, 1, 1);2488	iRtnValue = GC.getGame().GetGameReligions()->GetNumReligionsFounded(bIgnoreLocal);2489#else2490	iRtnValue = GC.getGame().GetGameReligions()->GetNumReligionsFounded();2491#endif2492	lua_pushinteger(L, iRtnValue);2493	return 1;2494}

Calls

Called by