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

Method moveToGround

library/modules/Items.cpp:922–934  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

920}
921
922bool DFHack::Items::moveToGround(df::item *item, df::coord pos) {
923 CHECK_NULL_POINTER(item);
924 if (!detachItem(item))
925 return false;
926
927 item->pos = pos;
928 item->flags.bits.on_ground = true;
929
930 // The moveToGround function can return false even when it succeeds,
931 // so we don't check the return value.
932 item->moveToGround(pos.x, pos.y, pos.z);
933 return true;
934}
935
936bool DFHack::Items::moveToContainer(df::item *item, df::item *container) {
937 CHECK_NULL_POINTER(item);

Callers 4

createItemMethod · 0.80
makeItemFunction · 0.80
create_bouldersFunction · 0.80
assignJobFunction · 0.80

Calls 1

detachItemFunction · 0.85

Tested by

no test coverage detected