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

Function items_moveToInventory

library/LuaApi.cpp:2594–2601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2592}
2593
2594static int items_moveToInventory(lua_State *state) {
2595 auto item = Lua::CheckDFObject<df::item>(state, 1);
2596 auto unit = Lua::CheckDFObject<df::unit>(state, 2);
2597 auto use_mode = (df::inv_item_role_type)luaL_optint(state, 3, 0);
2598 int body_part = luaL_optint(state, 4, -1);
2599 lua_pushboolean(state, Items::moveToInventory(item, unit, use_mode, body_part));
2600 return 1;
2601}
2602
2603static int items_createItem(lua_State *state)
2604{

Callers

nothing calls this directly

Calls 2

lua_pushbooleanFunction · 0.85
moveToInventoryFunction · 0.85

Tested by

no test coverage detected