CvLuaCity::lGetUnitProductionNeeded(lua_State *)
- Defined in
- Lua/CvLuaCity.cpp, line 1339
- Class
- CvLuaCity
- Hook name
CivHooks::CvLuaCity_lGetUnitProductionNeeded
Hooks
static bool BeforeCvLuaCity_lGetUnitProductionNeeded(lua_State* L, int& result);static void AfterCvLuaCity_lGetUnitProductionNeeded(lua_State* L, int& result);static int ReplaceCvLuaCity_lGetUnitProductionNeeded(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lGetUnitProductionNeeded>(host, &BeforeCvLuaCity_lGetUnitProductionNeeded);CivRegisterAfter<CivHooks::CvLuaCity_lGetUnitProductionNeeded>(host, &AfterCvLuaCity_lGetUnitProductionNeeded);CivRegisterReplace<CivHooks::CvLuaCity_lGetUnitProductionNeeded>(host, &ReplaceCvLuaCity_lGetUnitProductionNeeded);
Code
1338//int GetUnitProductionNeeded();1339int CvLuaCity::lGetUnitProductionNeeded(lua_State* L)1340{1341 CvCity* pkCity = GetInstance(L);1342 const UnitTypes eUnitType = (UnitTypes) lua_tointeger(L, 2);13431344 const int iResult = pkCity->getProductionNeeded(eUnitType);13451346 lua_pushinteger(L, iResult);1347 return 1;1348}
Calls
- CvCity::getProductionNeeded(UnitTypes) const
CvLuaScopedInstance::GetInstancelua_pushintegerlua_tointeger