MCPcopy Create free account
hub / github.com/NetHack/NetHack / uwepgone

Function uwepgone

src/wield.c:872–885  ·  view source on GitHub ↗

Functions to empty a given slot ***/ These should be used only when the item can't be put back in * the slot by life saving. Proper usage includes: * 1. The item has been eaten, stolen, burned away, or rotted away. * 2. Making an item disappear for a bones pile. */

Source from the content-addressed store, hash-verified

870 * 2. Making an item disappear for a bones pile.
871 */
872void
873uwepgone(void)
874{
875 if (uwep) {
876 if (artifact_light(uwep) && uwep->lamplit) {
877 end_burn(uwep, FALSE);
878 if (!Blind)
879 pline("%s shining.", Tobjnam(uwep, "stop"));
880 }
881 setworn((struct obj *) 0, W_WEP);
882 gu.unweapon = TRUE;
883 update_inventory();
884 }
885}
886
887void
888uswapwepgone(void)

Callers 6

remove_worn_itemFunction · 0.85
hmon_hitmon_joustingFunction · 0.85
drop_weaponFunction · 0.85
eatspecialFunction · 0.85
selftouchFunction · 0.85

Calls 6

artifact_lightFunction · 0.85
end_burnFunction · 0.85
TobjnamFunction · 0.85
setwornFunction · 0.85
update_inventoryFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected