Bazaar developer reference

CvLuaCity::lIsHasResourceLocal(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 3420
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lIsHasResourceLocal

Hooks

static bool BeforeCvLuaCity_lIsHasResourceLocal(lua_State* L, int& result);static void AfterCvLuaCity_lIsHasResourceLocal(lua_State* L, int& result);static int ReplaceCvLuaCity_lIsHasResourceLocal(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lIsHasResourceLocal>(host, &BeforeCvLuaCity_lIsHasResourceLocal);CivRegisterAfter<CivHooks::CvLuaCity_lIsHasResourceLocal>(host, &AfterCvLuaCity_lIsHasResourceLocal);CivRegisterReplace<CivHooks::CvLuaCity_lIsHasResourceLocal>(host, &ReplaceCvLuaCity_lIsHasResourceLocal);

Code

3419//bool IsHasResourceLocal(ResourceTypes iResource);3420int CvLuaCity::lIsHasResourceLocal(lua_State* L)3421{3422	CvCity* pkCity = GetInstance(L);3423	const int iResource = lua_tointeger(L, 2);3424	const bool bTestVisible = lua_toboolean(L, 3);3425	const bool bResult = pkCity->IsHasResourceLocal((ResourceTypes)iResource, bTestVisible);34263427	lua_pushboolean(L, bResult);3428	return 1;3429}

Calls

Called by