CvLuaUnit::lCanNukeAt(lua_State *)
- Defined in
- Lua/CvLuaUnit.cpp, line 1261
- Class
- CvLuaUnit
- Hook name
CivHooks::CvLuaUnit_lCanNukeAt
Hooks
static bool BeforeCvLuaUnit_lCanNukeAt(lua_State* L, int& result);static void AfterCvLuaUnit_lCanNukeAt(lua_State* L, int& result);static int ReplaceCvLuaUnit_lCanNukeAt(int (*original)(lua_State*), lua_State* L);CivRegisterBefore<CivHooks::CvLuaUnit_lCanNukeAt>(host, &BeforeCvLuaUnit_lCanNukeAt);CivRegisterAfter<CivHooks::CvLuaUnit_lCanNukeAt>(host, &AfterCvLuaUnit_lCanNukeAt);CivRegisterReplace<CivHooks::CvLuaUnit_lCanNukeAt>(host, &ReplaceCvLuaUnit_lCanNukeAt);
Code
1260//bool canNukeAt(CyPlot* pPlot, int iX, int iY);1261int CvLuaUnit::lCanNukeAt(lua_State* L)1262{1263 CvUnit* pkUnit = GetInstance(L);1264 const int x = lua_tointeger(L, 2);1265 const int y = lua_tointeger(L, 3);1266 const bool bResult = pkUnit->canNukeAt(pkUnit->plot(), x, y);12671268 lua_pushboolean(L, bResult);1269 return 1;1270}
Calls
CvLuaScopedInstance::GetInstance- CvUnit::canNukeAt(const CvPlot *, int, int) const
- CvUnit::plot() const
lua_pushbooleanlua_tointeger