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

Function consume_obj_charge

src/invent.c:1336–1346  ·  view source on GitHub ↗

use one charge from an item and possibly incur shop debt for it */

Source from the content-addressed store, hash-verified

1334
1335/* use one charge from an item and possibly incur shop debt for it */
1336void
1337consume_obj_charge(
1338 struct obj *obj,
1339 boolean maybe_unpaid) /* false if caller handles shop billing */
1340{
1341 if (maybe_unpaid)
1342 check_unpaid(obj);
1343 obj->spe -= 1;
1344 if (obj->known)
1345 update_inventory();
1346}
1347
1348/*
1349 * Adjust hero's attributes as if this object was being removed from the

Callers 10

use_crystal_ballFunction · 0.85
do_improvisationFunction · 0.85
dotipFunction · 0.85
hornoplentyFunction · 0.85
disarm_squeaky_boardFunction · 0.85
bagotricksFunction · 0.85
use_cameraFunction · 0.85
use_bellFunction · 0.85
use_tinning_kitFunction · 0.85
use_greaseFunction · 0.85

Calls 2

check_unpaidFunction · 0.85
update_inventoryFunction · 0.85

Tested by

no test coverage detected