Bazaar developer reference

CvLuaMap::lGetPlot(lua_State *)

Defined in
Lua/CvLuaMap.cpp, line 194
Class
CvLuaMap
Hook name
CivHooks::CvLuaMap_lGetPlot

Hooks

static bool BeforeCvLuaMap_lGetPlot(lua_State* L, int& result);static void AfterCvLuaMap_lGetPlot(lua_State* L, int& result);static int ReplaceCvLuaMap_lGetPlot(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaMap_lGetPlot>(host, &BeforeCvLuaMap_lGetPlot);CivRegisterAfter<CivHooks::CvLuaMap_lGetPlot>(host, &AfterCvLuaMap_lGetPlot);CivRegisterReplace<CivHooks::CvLuaMap_lGetPlot>(host, &ReplaceCvLuaMap_lGetPlot);

Code

194int CvLuaMap::lGetPlot(lua_State* L)195{196	const int x = lua_tointeger(L, 1);197	const int y = lua_tointeger(L, 2);198199	CvPlot* pPlot = GC.getMap().plot(x, y);200	if(pPlot)201	{202		CvLuaPlot::Push(L, pPlot);203		return 1;204	}205	return 0;206}

Calls

Called by