candy bar wrappers
Adopt the suggestion that candy bar stacks which get split should keep the same wrapper text for both halves of the stack. The patch stuck with using obj->o_id to manage the wrapper which prior to the patch wasn't a factor in merging and splitting. Switch to obj->spe instead, comparable to tin varities, so mergability is already taken care of. End of game disclosure tacks on T-shirt text to formatted items. Do the same for candy bar wrappers.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 mkobj.c $NHDT-Date: 1595787211 2020/07/26 18:13:31 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.182 $ */
|
||||
/* NetHack 3.6 mkobj.c $NHDT-Date: 1596162341 2020/07/31 02:25:41 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.183 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -836,6 +836,12 @@ boolean artif;
|
||||
case KELP_FROND:
|
||||
otmp->quan = (long) rnd(2);
|
||||
break;
|
||||
case CANDY_BAR:
|
||||
/* set otmp->spe */
|
||||
assign_candy_wrapper(otmp);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (Is_pudding(otmp)) {
|
||||
otmp->quan = 1L; /* for emphasis; glob quantity is always 1 */
|
||||
|
||||
Reference in New Issue
Block a user