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

Function useupall

src/invent.c:1308–1317  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1306}
1307
1308RESTORE_WARNING_FORMAT_NONLITERAL
1309
1310/* useup() all of an item regardless of its quantity */
1311void
1312useupall(struct obj *obj)
1313{
1314 setnotworn(obj);
1315 freeinv(obj);
1316 obfree(obj, (struct obj *) 0); /* deletes contents also */
1317}
1318
1319/* an item in inventory is going away after being used */
1320void

Callers 15

chweponFunction · 0.85
dip_potion_explosionFunction · 0.85
potion_dipFunction · 0.85
nhl_gamestateFunction · 0.85
nhl_u_clear_inventoryFunction · 0.85
burn_objectFunction · 0.85
useupFunction · 0.85
eatspecialFunction · 0.85
shrinking_glob_goneFunction · 0.85
lava_damageFunction · 0.85
lava_effectsFunction · 0.85
u_init_inventory_attrsFunction · 0.85

Calls 3

setnotwornFunction · 0.85
freeinvFunction · 0.85
obfreeFunction · 0.85

Tested by

no test coverage detected