-HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.917 $ $NHDT-Date: 1652719274 2022/05/16 16:41:14 $
+HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.933 $ $NHDT-Date: 1654205933 2022/06/02 21:38:53 $
General Fixes and Modified Features
-----------------------------------
was producing a randomly chosen Pratchett novel; make it fail instead
when a monster killed a pudding and it left a glob, that glob might not be
displayed on the map (wasn't an issue for killed-by-hero case)
-lua's garbage collection doesn't like the way nethack is trying to use it and
- issues a pair of warnings each time the relevant code gets run; they
- were vanishing into a bit bucket but now they will be displayed when
- running in wizard mode; we need to fix the usage rather than just
- hide the feedback
+if player gave a subset count when removing an item from a container, then got
+ the pickup_burden prompt and declined to continue, the item remained
+ split rather be recombined, making it possible to create multiple
+ stacks of gold inside a container
Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
for menustyle:Traditional, fix 'P' for just picked up items in inventory when
filtering what items to put into a container
restrict stunning effect to is_xport trap types
+lua's garbage collection didn't like the way nethack was trying to use it and
+ issued a pair of warnings each time the relevant code got run
curses: 'msg_window' option wasn't functional for curses unless the binary
also included tty support
-/* NetHack 3.7 invent.c $NHDT-Date: 1652861830 2022/05/18 08:17:10 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.389 $ */
+/* NetHack 3.7 invent.c $NHDT-Date: 1654205933 2022/06/02 21:38:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.391 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
/*FALLTHRU*/
case 'y':
tmp = (*fn)(otmp);
- if (tmp < 0) {
+ if (tmp <= 0) {
if (container_gone(fn)) {
/* otmp caused magic bag to explode;
both are now gone */
otmp = 0; /* and return */
} else if (otmp && otmp != otmpo) {
/* split occurred, merge again */
- (void) merged(&otmpo, &otmp);
+ (void) unsplitobj(otmp);
}
- goto ret;
+ if (tmp < 0)
+ goto ret;
}
cnt += tmp;
if (--mx == 0)
-/* NetHack 3.7 pickup.c $NHDT-Date: 1608673693 2020/12/22 21:48:13 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.273 $ */
+/* NetHack 3.7 pickup.c $NHDT-Date: 1654205934 2022/06/02 21:38:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.308 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2012. */
/* NetHack may be freely redistributed. See license for details. */
/* determine whether character is able and player is willing to carry `obj' */
static
int
-lift_object(struct obj *obj, /* object to pick up... */
- struct obj *container, /* ...bag it's coming out of */
- long *cnt_p,
- boolean telekinesis)
+lift_object(
+ struct obj *obj, /* object to pick up... */
+ struct obj *container, /* ...bag it's coming out of */
+ long *cnt_p,
+ boolean telekinesis)
{
int result, old_wt, new_wt, prev_encumbr, next_encumbr;
* up, 1 if otherwise.
*/
int
-pickup_object(struct obj *obj, long count,
- boolean telekinesis) /* not picking it up directly by hand */
+pickup_object(
+ struct obj *obj,
+ long count,
+ boolean telekinesis) /* not picking it up directly by hand */
{
int res, nearload;
/* special split case also handled by askchain() */
}
res = put_in ? in_container(otmp) : out_container(otmp);
- if (res < 0) {
+ if (res <= 0) {
if (!g.current_container) {
/* otmp caused current_container to explode;
both are now gone */
otmp = 0; /* and break loop */
} else if (otmp && otmp != pick_list[i].item.a_obj) {
/* split occurred, merge again */
- (void) merged(&pick_list[i].item.a_obj, &otmp);
+ (void) unsplitobj(otmp);
}
- break;
+ if (res < 0)
+ break;
}
}
free((genericptr_t) pick_list);
}
static char
-in_or_out_menu(const char *prompt, struct obj *obj, boolean outokay,
- boolean inokay, boolean alreadyused, boolean more_containers)
+in_or_out_menu(
+ const char *prompt,
+ struct obj *obj,
+ boolean outokay, /* can take out */
+ boolean inokay, /* can put in */
+ boolean alreadyused, /* controls phrasing of the decline choice */
+ boolean more_containers)
{
/* underscore is not a choice; it's used to skip element [0] */
static const char lootchars[] = "_:oibrsnq", abc_chars[] = "_:abcdenq";