CvLuaCity::lGetNumGreatWorks(lua_State *)
- Defined in
- Lua/CvLuaCity.cpp, line 2382
- Class
- CvLuaCity
- Hook name
CivHooks::CvLuaCity_lGetNumGreatWorks
Hooks
static bool BeforeCvLuaCity_lGetNumGreatWorks(lua_State* L, int& result);static void AfterCvLuaCity_lGetNumGreatWorks(lua_State* L, int& result);static int ReplaceCvLuaCity_lGetNumGreatWorks(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lGetNumGreatWorks>(host, &BeforeCvLuaCity_lGetNumGreatWorks);CivRegisterAfter<CivHooks::CvLuaCity_lGetNumGreatWorks>(host, &AfterCvLuaCity_lGetNumGreatWorks);CivRegisterReplace<CivHooks::CvLuaCity_lGetNumGreatWorks>(host, &ReplaceCvLuaCity_lGetNumGreatWorks);
Code
2381//int GetNumGreatWorks();2382int CvLuaCity::lGetNumGreatWorks(lua_State* L)2383{2384 CvCity* pkCity = GetInstance(L);2385#if defined(MOD_API_LUA_EXTENSIONS) && defined(MOD_GLOBAL_GREATWORK_YIELDTYPES)2386 const bool bIgnoreYield = luaL_optbool(L, 2, true);2387 lua_pushinteger(L, pkCity->GetCityCulture()->GetNumGreatWorks(bIgnoreYield));2388#else2389 lua_pushinteger(L, pkCity->GetCityCulture()->GetNumGreatWorks());2390#endif2391 return 1;2392}
Calls
- CvCity::GetCityCulture() const
- CvCityCulture::GetNumGreatWorks(bool) const
CvLuaScopedInstance::GetInstancelua_pushinteger- luaL_optbool(lua_State *, int, bool)