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

Function get_burrow

plugins/burrow.cpp:254–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254static df::burrow* get_burrow(lua_State *L, int idx) {
255 df::burrow *burrow = NULL;
256 if (lua_isuserdata(L, idx))
257 burrow = Lua::GetDFObject<df::burrow>(L, idx);
258 else if (lua_isstring(L, idx))
259 burrow = Burrows::findByName(luaL_checkstring(L, idx), true);
260 else if (lua_isinteger(L, idx))
261 burrow = df::burrow::find(luaL_checkinteger(L, idx));
262 return burrow;
263}
264
265static void copyTiles(df::burrow *target, df::burrow *source, bool enable) {
266 CHECK_NULL_POINTER(target);

Callers 6

burrow_tiles_clearFunction · 0.85
tiles_set_add_removeFunction · 0.85
box_fillFunction · 0.85
flood_fillFunction · 0.85
burrow_units_clearFunction · 0.85
units_set_add_removeFunction · 0.85

Calls 5

lua_isuserdataFunction · 0.85
lua_isstringFunction · 0.85
lua_isintegerFunction · 0.85
luaL_checkintegerFunction · 0.85
findFunction · 0.50

Tested by

no test coverage detected