Bazaar developer reference

CvLuaCity::lGetNumForcedWorkingPlots(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 3939
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lGetNumForcedWorkingPlots

Hooks

static bool BeforeCvLuaCity_lGetNumForcedWorkingPlots(lua_State* L, int& result);static void AfterCvLuaCity_lGetNumForcedWorkingPlots(lua_State* L, int& result);static int ReplaceCvLuaCity_lGetNumForcedWorkingPlots(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lGetNumForcedWorkingPlots>(host, &BeforeCvLuaCity_lGetNumForcedWorkingPlots);CivRegisterAfter<CivHooks::CvLuaCity_lGetNumForcedWorkingPlots>(host, &AfterCvLuaCity_lGetNumForcedWorkingPlots);CivRegisterReplace<CivHooks::CvLuaCity_lGetNumForcedWorkingPlots>(host, &ReplaceCvLuaCity_lGetNumForcedWorkingPlots);

Code

3938//bool GetNumForcedWorkingPlots(CyPlot* pPlot);3939int CvLuaCity::lGetNumForcedWorkingPlots(lua_State* L)3940{3941	CvCity* pkCity = GetInstance(L);3942	const int iResult = pkCity->GetCityCitizens()->GetNumForcedWorkingPlots();39433944	lua_pushinteger(L, iResult);3945	return 1;3946}

Calls

Called by