Bazaar developer reference

CvLuaMap::lFindBiggestArea(lua_State *)

Defined in
Lua/CvLuaMap.cpp, line 109
Class
CvLuaMap
Hook name
CivHooks::CvLuaMap_lFindBiggestArea

Hooks

static bool BeforeCvLuaMap_lFindBiggestArea(lua_State* L, int& result);static void AfterCvLuaMap_lFindBiggestArea(lua_State* L, int& result);static int ReplaceCvLuaMap_lFindBiggestArea(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaMap_lFindBiggestArea>(host, &BeforeCvLuaMap_lFindBiggestArea);CivRegisterAfter<CivHooks::CvLuaMap_lFindBiggestArea>(host, &AfterCvLuaMap_lFindBiggestArea);CivRegisterReplace<CivHooks::CvLuaMap_lFindBiggestArea>(host, &ReplaceCvLuaMap_lFindBiggestArea);

Code

109int CvLuaMap::lFindBiggestArea(lua_State* L)110{111	const bool bWater = lua_toboolean(L, 1);112113	CvArea* pkArea = GC.getMap().findBiggestArea(bWater);114	if(pkArea)115	{116		CvLuaArea::Push(L, pkArea);117		return 1;118	}119120	return 0;121}

Calls

Called by