Bazaar developer reference

CvLuaCity::lGetNumGreatWorksInBuilding(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 4103
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lGetNumGreatWorksInBuilding

Hooks

static bool BeforeCvLuaCity_lGetNumGreatWorksInBuilding(lua_State* L, int& result);static void AfterCvLuaCity_lGetNumGreatWorksInBuilding(lua_State* L, int& result);static int ReplaceCvLuaCity_lGetNumGreatWorksInBuilding(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lGetNumGreatWorksInBuilding>(host, &BeforeCvLuaCity_lGetNumGreatWorksInBuilding);CivRegisterAfter<CivHooks::CvLuaCity_lGetNumGreatWorksInBuilding>(host, &AfterCvLuaCity_lGetNumGreatWorksInBuilding);CivRegisterReplace<CivHooks::CvLuaCity_lGetNumGreatWorksInBuilding>(host, &ReplaceCvLuaCity_lGetNumGreatWorksInBuilding);

Code

4102//int GetNumGreatWorksInBuilding(BuildingClassTypes eBuildingClass) const;4103int CvLuaCity::lGetNumGreatWorksInBuilding(lua_State* L)4104{4105	CvCity* pkCity = GetInstance(L);4106	const BuildingClassTypes iIndex = toValue<BuildingClassTypes>(L, 2);4107	const int iResult = pkCity->GetCityBuildings()->GetNumGreatWorksInBuilding(iIndex);4108	lua_pushinteger(L, iResult);4109	return 1;4110}

Calls

Called by