CvLuaMap::lFindWater(lua_State *)
- Defined in
- Lua/CvLuaMap.cpp, line 123
- Class
- CvLuaMap
- Hook name
CivHooks::CvLuaMap_lFindWater
Hooks
static bool BeforeCvLuaMap_lFindWater(lua_State* L, int& result);static void AfterCvLuaMap_lFindWater(lua_State* L, int& result);static int ReplaceCvLuaMap_lFindWater(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaMap_lFindWater>(host, &BeforeCvLuaMap_lFindWater);CivRegisterAfter<CivHooks::CvLuaMap_lFindWater>(host, &AfterCvLuaMap_lFindWater);CivRegisterReplace<CivHooks::CvLuaMap_lFindWater>(host, &ReplaceCvLuaMap_lFindWater);
Code
123int CvLuaMap::lFindWater(lua_State* L)124{125 CvPlot* pkPlot = CvLuaPlot::GetInstance(L, 1);126 const int iRange = luaL_checkint(L, 2);127 const bool bFreshWater = lua_toboolean(L, 3);128 const bool bResult = GC.getMap().findWater(pkPlot, iRange, bFreshWater);129130 lua_pushboolean(L, bResult);131 return 1;132}
Calls
- CvGlobals::getMap()
CvLuaScopedInstance::GetInstance- CvMap::findWater(CvPlot *, int, bool)
lua_pushbooleanlua_tobooleanluaL_checkinteger