polymorphing worn items (trunk only)

From a bug report.  That's hard to fix in the general case because armor
and tools might not fit back into the same equipment slot, but most other
types of worn items can be re-worn after being transformed.  This makes
any transformed worn item stay worn if it is wearable in the same slot.
This commit is contained in:
nethack.rankin
2006-11-28 05:06:13 +00:00
parent 59354953cc
commit 8d86a87a7b
6 changed files with 116 additions and 44 deletions

View File

@@ -1,4 +1,4 @@
/* SCCS Id: @(#)allmain.c 3.5 2006/04/01 */
/* SCCS Id: @(#)allmain.c 3.5 2006/11/27 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -53,9 +53,9 @@ boolean resuming;
if (!resuming) { /* new game */
context.rndencode = rnd(9000);
set_wear(); /* handle side-effects of worn starting gear */
set_wear((struct obj *)0); /* for side-effects of worn starting gear */
(void) pickup(1); /* autopickup at initial location */
} else {
} else { /* restore old game */
update_inventory(); /* for perm_invent */
read_engr_at(u.ux, u.uy); /* subset of pickup() */
}