container groundwork / splitting welded weapons (trunk only)

Some miscellaneous changes preparatory to enhancing the container
interface.  This also fixes a minor inconsistency in object manipulation:
askchain() wouldn't let you split a stack of welded weapons but getobj()
would, so you couldn't get rid of part of the stack using 'D' or #loot,
but you could with 'd' (and post-3.4.3, with #adjust).  Now getobj() will
behave like askchain(); if you have 3 cursed daggers welded to your hand,
you won't be able to drop 1 or 2 of them anymore.
This commit is contained in:
nethack.rankin
2007-01-04 05:46:14 +00:00
parent dccedb99ba
commit c45ce7a999
6 changed files with 40 additions and 30 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)do.c 3.5 2006/07/08 */
/* SCCS Id: @(#)do.c 3.5 2007/01/02 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -657,6 +657,7 @@ int retry;
assigninvlet(u_gold); /* might end up as NOINVSYM */
u_gold->nobj = invent;
invent = u_gold;
u_gold->where = OBJ_INVENT;
}
#endif
if (retry) {
@@ -732,6 +733,7 @@ int retry;
u_gold = invent;
invent = u_gold->nobj;
u_gold->in_use = FALSE;
u_gold->where = OBJ_FREE;
dealloc_obj(u_gold);
update_inventory();
}