MCPcopy Create free account
hub / github.com/DFHack/dfhack / PushPosXY

Method PushPosXY

library/LuaTools.cpp:207–220  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

205}
206
207int DFHack::Lua::PushPosXY(lua_State *state, const df::coord2d &pos)
208{
209 if (!pos.isValid())
210 {
211 lua_pushnil(state);
212 return 1;
213 }
214 else
215 {
216 lua_pushinteger(state, pos.x);
217 lua_pushinteger(state, pos.y);
218 return 2;
219 }
220}
221
222/*
223 * Public DF object reference handling API

Callers

nothing calls this directly

Calls 3

lua_pushnilFunction · 0.85
lua_pushintegerFunction · 0.85
isValidMethod · 0.45

Tested by

no test coverage detected