Bazaar developer reference

CvLuaPlayer::lGetBuildingProductionNeeded(lua_State *)

Defined in
Lua/CvLuaPlayer.cpp, line 1814
Class
CvLuaPlayer
Hook name
CivHooks::CvLuaPlayer_lGetBuildingProductionNeeded

Hooks

static bool BeforeCvLuaPlayer_lGetBuildingProductionNeeded(lua_State* L, int& result);static void AfterCvLuaPlayer_lGetBuildingProductionNeeded(lua_State* L, int& result);static int ReplaceCvLuaPlayer_lGetBuildingProductionNeeded(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaPlayer_lGetBuildingProductionNeeded>(host, &BeforeCvLuaPlayer_lGetBuildingProductionNeeded);CivRegisterAfter<CivHooks::CvLuaPlayer_lGetBuildingProductionNeeded>(host, &AfterCvLuaPlayer_lGetBuildingProductionNeeded);CivRegisterReplace<CivHooks::CvLuaPlayer_lGetBuildingProductionNeeded>(host, &ReplaceCvLuaPlayer_lGetBuildingProductionNeeded);

Code

1813//int getBuildingProductionNeeded(BuildingTypes  iIndex);1814int CvLuaPlayer::lGetBuildingProductionNeeded(lua_State* L)1815{1816	CvPlayerAI* pkPlayer = GetInstance(L);1817	const BuildingTypes iIndex = (BuildingTypes)lua_tointeger(L, 2);18181819	const int iResult = pkPlayer->getProductionNeeded(iIndex);1820	lua_pushinteger(L, iResult);1821	return 1;1822}

Calls

Called by