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

Function CheckCoordXY

library/LuaApi.cpp:143–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141void dfhack_printerr(lua_State *S, const string &str);
142
143static df::coord2d CheckCoordXY(lua_State *state, int base, bool vararg = false)
144{
145 df::coord2d p;
146 if (vararg && lua_gettop(state) <= base)
147 Lua::CheckDFAssign(state, &p, base);
148 else
149 {
150 p = df::coord2d(
151 luaL_checkint(state, base),
152 luaL_checkint(state, base+1)
153 );
154 }
155 return p;
156}
157
158static df::coord CheckCoordXYZ(lua_State *state, int base, bool vararg = false)
159{

Callers 2

maps_getRegionBiomeFunction · 0.85
maps_getBiomeTypeFunction · 0.85

Calls 2

lua_gettopFunction · 0.85
CheckDFAssignFunction · 0.85

Tested by

no test coverage detected