more perm_invent handling
Keep permanent inventory window up to date when using charged items. Also a status line bit for the #tip command.
This commit is contained in:
13
src/invent.c
13
src/invent.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)invent.c 3.4 2003/04/02 */
|
||||
/* SCCS Id: @(#)invent.c 3.4 2003/05/25 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -464,6 +464,17 @@ register struct obj *obj;
|
||||
}
|
||||
}
|
||||
|
||||
/* use one charge from an item and possibly incur shop debt for it */
|
||||
void
|
||||
consume_obj_charge(obj, maybe_unpaid)
|
||||
struct obj *obj;
|
||||
boolean maybe_unpaid; /* false if caller handles shop billing */
|
||||
{
|
||||
if (maybe_unpaid) check_unpaid(obj);
|
||||
obj->spe -= 1;
|
||||
if (obj->known) update_inventory();
|
||||
}
|
||||
|
||||
#endif /* OVLB */
|
||||
#ifdef OVL3
|
||||
|
||||
|
||||
Reference in New Issue
Block a user