CvLuaGame::lGetNumReligionsStillToFound(lua_State *)
- Defined in
- Lua/CvLuaGame.cpp, line 2470
- Class
- CvLuaGame
- Hook name
CivHooks::CvLuaGame_lGetNumReligionsStillToFound
Hooks
static bool BeforeCvLuaGame_lGetNumReligionsStillToFound(lua_State* L, int& result);static void AfterCvLuaGame_lGetNumReligionsStillToFound(lua_State* L, int& result);static int ReplaceCvLuaGame_lGetNumReligionsStillToFound(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaGame_lGetNumReligionsStillToFound>(host, &BeforeCvLuaGame_lGetNumReligionsStillToFound);CivRegisterAfter<CivHooks::CvLuaGame_lGetNumReligionsStillToFound>(host, &AfterCvLuaGame_lGetNumReligionsStillToFound);CivRegisterReplace<CivHooks::CvLuaGame_lGetNumReligionsStillToFound>(host, &ReplaceCvLuaGame_lGetNumReligionsStillToFound);
Code
2470int CvLuaGame::lGetNumReligionsStillToFound(lua_State* L)2471{2472 int iRtnValue;2473#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_RELIGION_LOCAL_RELIGIONS)2474 const bool bIgnoreLocal = luaL_optint(L, 1, 1);2475 iRtnValue = GC.getGame().GetGameReligions()->GetNumReligionsStillToFound(bIgnoreLocal);2476#else2477 iRtnValue = GC.getGame().GetGameReligions()->GetNumReligionsStillToFound();2478#endif2479 lua_pushinteger(L, iRtnValue);2480 return 1;2481}
Calls
- CvGame::GetGameReligions()
- CvGameReligions::GetNumReligionsStillToFound(bool) const
- CvGlobals::getGame()
lua_pushintegerluaL_optinteger