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

Function resetUnitInvFlags

library/modules/Items.cpp:802–811  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

800}
801
802static void resetUnitInvFlags(df::unit *unit, df::unit_inventory_item *inv_item) {
803 if (inv_item->mode == df::inv_item_role_type::Worn ||
804 inv_item->mode == df::inv_item_role_type::WrappedAround)
805 {
806 unit->flags2.bits.calculated_inventory = false;
807 unit->flags2.bits.calculated_insulation = false;
808 }
809 else if (inv_item->mode == df::inv_item_role_type::StuckIn)
810 unit->flags3.bits.stuck_weapon_computed = false;
811}
812
813static bool detachItem(df::item *item)
814{ // Remove item from any inventory or map block

Callers 2

detachItemFunction · 0.85
moveToInventoryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected