CvLuaCity::lGetBuildingProductionNeeded(lua_State *)
- Defined in
- Lua/CvLuaCity.cpp, line 1351
- Class
- CvLuaCity
- Hook name
CivHooks::CvLuaCity_lGetBuildingProductionNeeded
Hooks
static bool BeforeCvLuaCity_lGetBuildingProductionNeeded(lua_State* L, int& result);static void AfterCvLuaCity_lGetBuildingProductionNeeded(lua_State* L, int& result);static int ReplaceCvLuaCity_lGetBuildingProductionNeeded(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lGetBuildingProductionNeeded>(host, &BeforeCvLuaCity_lGetBuildingProductionNeeded);CivRegisterAfter<CivHooks::CvLuaCity_lGetBuildingProductionNeeded>(host, &AfterCvLuaCity_lGetBuildingProductionNeeded);CivRegisterReplace<CivHooks::CvLuaCity_lGetBuildingProductionNeeded>(host, &ReplaceCvLuaCity_lGetBuildingProductionNeeded);
Code
1350//int GetBuildingProductionNeeded();1351int CvLuaCity::lGetBuildingProductionNeeded(lua_State* L)1352{1353 CvCity* pkCity = GetInstance(L);1354 const BuildingTypes eBuildingType = (BuildingTypes) lua_tointeger(L, 2);13551356 const int iResult = pkCity->getProductionNeeded(eBuildingType);13571358 lua_pushinteger(L, iResult);1359 return 1;1360}
Calls
- CvCity::getProductionNeeded(BuildingTypes) const
CvLuaScopedInstance::GetInstancelua_pushintegerlua_tointeger