Bazaar developer reference

CvLuaCity::lCanPrepare(lua_State *)

Defined in
Lua/CvLuaCity.cpp, line 918
Class
CvLuaCity
Hook name
CivHooks::CvLuaCity_lCanPrepare

Hooks

static bool BeforeCvLuaCity_lCanPrepare(lua_State* L, int& result);static void AfterCvLuaCity_lCanPrepare(lua_State* L, int& result);static int ReplaceCvLuaCity_lCanPrepare(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaCity_lCanPrepare>(host, &BeforeCvLuaCity_lCanPrepare);CivRegisterAfter<CivHooks::CvLuaCity_lCanPrepare>(host, &AfterCvLuaCity_lCanPrepare);CivRegisterReplace<CivHooks::CvLuaCity_lCanPrepare>(host, &ReplaceCvLuaCity_lCanPrepare);

Code

917//bool canPrepare( int iSpecialist, bool bContinue );918int CvLuaCity::lCanPrepare(lua_State* L)919{920	CvCity* pkCity = GetInstance(L);921	const int iSpecialist = lua_tointeger(L, 2);922	const bool bContinue = luaL_optint(L, 3, 0);923	const bool bResult = pkCity->canPrepare((SpecialistTypes)iSpecialist, bContinue);924925	lua_pushboolean(L, bResult);926	return 1;927}

Calls

Called by