MCPcopy Index your code
hub / github.com/NetHack/NetHack / container_weight

Function container_weight

src/mkobj.c:2732–2738  ·  view source on GitHub ↗

recalculate weight of object, which doesn't have to be a container itself; if it is contained, recursively handle _its_ container(s) */

Source from the content-addressed store, hash-verified

2730/* recalculate weight of object, which doesn't have to be a container
2731 itself; if it is contained, recursively handle _its_ container(s) */
2732void
2733container_weight(struct obj *object)
2734{
2735 object->owt = weight(object);
2736 if (object->where == OBJ_CONTAINED)
2737 container_weight(object->ocontainer);
2738}
2739
2740/*
2741 * Mark object to be deallocated. _All_ objects should be run through here

Callers 4

hatch_eggFunction · 0.85
shrink_globFunction · 0.85
obj_extract_selfFunction · 0.85
blank_novelFunction · 0.85

Calls 1

weightFunction · 0.85

Tested by

no test coverage detected