Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.223 $ $NHDT-Date: 1546655319 2019/01/05 02:28:39 $
|
$NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.224 $ $NHDT-Date: 1546687293 2019/01/05 11:21:33 $
|
||||||
|
|
||||||
This fixes36.2 file is here to capture information about updates in the 3.6.x
|
This fixes36.2 file is here to capture information about updates in the 3.6.x
|
||||||
lineage following the release of 3.6.1 in April 2018. Please note, however,
|
lineage following the release of 3.6.1 in April 2018. Please note, however,
|
||||||
@@ -373,6 +373,11 @@ if bouldersym bug (via 'O', above) put a <NUL> ('\0') on the map, examining
|
|||||||
"Alphabet soup: 'an("")'."
|
"Alphabet soup: 'an("")'."
|
||||||
wizard mode m^T, not selecting a teleport choice didn't teardown the menu
|
wizard mode m^T, not selecting a teleport choice didn't teardown the menu
|
||||||
properly and could eventually lead to "No window slots!" panic
|
properly and could eventually lead to "No window slots!" panic
|
||||||
|
when in a shop and using ':' to look inside a container in inventory, items
|
||||||
|
owned by hero showed price they'd be charged if hero was buying them
|
||||||
|
when in a shop and using ':' to look inside a container on shop floor, items
|
||||||
|
that shopkeeper didn't care about weren't shown as "no charge" unless
|
||||||
|
the hero owned the container
|
||||||
tty: turn off an optimization that is the suspected cause of Windows reported
|
tty: turn off an optimization that is the suspected cause of Windows reported
|
||||||
partial status lines following level changes
|
partial status lines following level changes
|
||||||
tty: ensure that current status fields are always copied to prior status
|
tty: ensure that current status fields are always copied to prior status
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 extern.h $NHDT-Date: 1546565812 2019/01/04 01:36:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.680 $ */
|
/* NetHack 3.6 extern.h $NHDT-Date: 1546687295 2019/01/05 11:21:35 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.681 $ */
|
||||||
/* Copyright (c) Steve Creps, 1988. */
|
/* Copyright (c) Steve Creps, 1988. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -2248,7 +2248,7 @@ E void FDECL(shk_chat, (struct monst *));
|
|||||||
E void FDECL(check_unpaid_usage, (struct obj *, BOOLEAN_P));
|
E void FDECL(check_unpaid_usage, (struct obj *, BOOLEAN_P));
|
||||||
E void FDECL(check_unpaid, (struct obj *));
|
E void FDECL(check_unpaid, (struct obj *));
|
||||||
E void FDECL(costly_gold, (XCHAR_P, XCHAR_P, long));
|
E void FDECL(costly_gold, (XCHAR_P, XCHAR_P, long));
|
||||||
E long FDECL(get_cost_of_shop_item, (struct obj *));
|
E long FDECL(get_cost_of_shop_item, (struct obj *, int *));
|
||||||
E int FDECL(oid_price_adjustment, (struct obj *, unsigned));
|
E int FDECL(oid_price_adjustment, (struct obj *, unsigned));
|
||||||
E boolean FDECL(block_door, (XCHAR_P, XCHAR_P));
|
E boolean FDECL(block_door, (XCHAR_P, XCHAR_P));
|
||||||
E boolean FDECL(block_entry, (XCHAR_P, XCHAR_P));
|
E boolean FDECL(block_entry, (XCHAR_P, XCHAR_P));
|
||||||
|
|||||||
20
src/objnam.c
20
src/objnam.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 objnam.c $NHDT-Date: 1545774525 2018/12/25 21:48:45 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.231 $ */
|
/* NetHack 3.6 objnam.c $NHDT-Date: 1546687293 2019/01/05 11:21:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.232 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1203,21 +1203,23 @@ unsigned doname_flags;
|
|||||||
}
|
}
|
||||||
/* treat 'restoring' like suppress_price because shopkeeper and
|
/* treat 'restoring' like suppress_price because shopkeeper and
|
||||||
bill might not be available yet while restore is in progress */
|
bill might not be available yet while restore is in progress */
|
||||||
if (!iflags.suppress_price && !restoring && is_unpaid(obj)) {
|
if (iflags.suppress_price || restoring) {
|
||||||
|
; /* don't attempt to obtain any stop pricing, even if 'with_price' */
|
||||||
|
} else if (is_unpaid(obj)) { /* in inventory or in container in invent */
|
||||||
long quotedprice = unpaid_cost(obj, TRUE);
|
long quotedprice = unpaid_cost(obj, TRUE);
|
||||||
|
|
||||||
Sprintf(eos(bp), " (%s, %ld %s)",
|
Sprintf(eos(bp), " (%s, %ld %s)",
|
||||||
obj->unpaid ? "unpaid" : "contents",
|
obj->unpaid ? "unpaid" : "contents",
|
||||||
quotedprice, currency(quotedprice));
|
quotedprice, currency(quotedprice));
|
||||||
} else if (with_price) {
|
} else if (with_price) { /* on floor or in container on floor */
|
||||||
long price = get_cost_of_shop_item(obj); /* updates obj->ox,oy */
|
int nochrg = 0;
|
||||||
|
long price = get_cost_of_shop_item(obj, &nochrg);
|
||||||
|
|
||||||
if (price > 0L)
|
if (price > 0L)
|
||||||
Sprintf(eos(bp), " (%ld %s)", price, currency(price));
|
Sprintf(eos(bp), " (%s, %ld %s)",
|
||||||
else if (obj->no_charge /* only set for items on shop floor */
|
nochrg ? "contents" : "for sale",
|
||||||
&& *u.ushops /* but make sure hero is inside same shop */
|
price, currency(price));
|
||||||
&& (*in_rooms(u.ux, u.uy, SHOPBASE)
|
else if (nochrg > 0)
|
||||||
== *in_rooms(obj->ox, obj->oy, SHOPBASE)))
|
|
||||||
Strcat(bp, " (no charge)");
|
Strcat(bp, " (no charge)");
|
||||||
}
|
}
|
||||||
if (!strncmp(prefix, "a ", 2)) {
|
if (!strncmp(prefix, "a ", 2)) {
|
||||||
|
|||||||
18
src/shk.c
18
src/shk.c
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 shk.c $NHDT-Date: 1545953813 2018/12/27 23:36:53 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.150 $ */
|
/* NetHack 3.6 shk.c $NHDT-Date: 1546687294 2019/01/05 11:21:34 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.151 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1976,19 +1976,27 @@ unsigned id;
|
|||||||
/* Returns the price of an arbitrary item in the shop,
|
/* Returns the price of an arbitrary item in the shop,
|
||||||
0 if the item doesn't belong to a shopkeeper or hero is not in the shop. */
|
0 if the item doesn't belong to a shopkeeper or hero is not in the shop. */
|
||||||
long
|
long
|
||||||
get_cost_of_shop_item(obj)
|
get_cost_of_shop_item(obj, nochrg)
|
||||||
register struct obj *obj;
|
register struct obj *obj;
|
||||||
{
|
int *nochrg; /* alternate return value: 1: no charge, 0: shop owned, */
|
||||||
|
{ /* -1: not in a shop (so should't be formatted as "no charge") */
|
||||||
struct monst *shkp;
|
struct monst *shkp;
|
||||||
|
struct obj *top;
|
||||||
xchar x, y;
|
xchar x, y;
|
||||||
long cost = 0L;
|
long cost = 0L;
|
||||||
|
|
||||||
|
*nochrg = -1; /* assume 'not applicable' */
|
||||||
if (*u.ushops && obj->oclass != COIN_CLASS
|
if (*u.ushops && obj->oclass != COIN_CLASS
|
||||||
&& obj != uball && obj != uchain
|
&& obj != uball && obj != uchain
|
||||||
&& get_obj_location(obj, &x, &y, CONTAINED_TOO)
|
&& get_obj_location(obj, &x, &y, CONTAINED_TOO)
|
||||||
&& *in_rooms(u.ux, u.uy, SHOPBASE) == *in_rooms(x, y, SHOPBASE)
|
&& *in_rooms(x, y, SHOPBASE) == *u.ushops
|
||||||
&& (shkp = shop_keeper(inside_shop(x, y))) != 0 && inhishop(shkp)) {
|
&& (shkp = shop_keeper(inside_shop(x, y))) != 0 && inhishop(shkp)) {
|
||||||
cost = obj->no_charge ? 0L : obj->quan * get_cost(obj, shkp);
|
for (top = obj; top->ocontainer; top = top->ocontainer)
|
||||||
|
continue;
|
||||||
|
*nochrg = (top->where == OBJ_FLOOR && obj->no_charge);
|
||||||
|
|
||||||
|
if (carried(top) ? (int) obj->unpaid : !*nochrg)
|
||||||
|
cost = obj->quan * get_cost(obj, shkp);
|
||||||
if (Has_contents(obj))
|
if (Has_contents(obj))
|
||||||
cost += contained_cost(obj, shkp, 0L, FALSE, FALSE);
|
cost += contained_cost(obj, shkp, 0L, FALSE, FALSE);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user