container_contents() vs show goods
Fix another inconsistency with containers in shops: prices shown when looking inside. Apply had them (because shop goods in containers are flagged as 'unpaid' when hero carries the container), and loot did not (because they aren't flagged that way).
This commit is contained in:
@@ -307,6 +307,8 @@ unlike #chat in a shop, walking on an item in a shop failed to include price
|
||||
for hero-owned container holding shop-owned items
|
||||
bag of holding explosion inside shop billed hero for unpaid contents if it
|
||||
happened when applied while carried but not when looted while on floor
|
||||
looking into an applied container with ':' showed prices of unpaid items but
|
||||
looking into a looted one with ':' did not show prices for shop items
|
||||
|
||||
|
||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1545771927 2018/12/25 21:05:27 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.161 $ */
|
||||
/* NetHack 3.6 end.c $NHDT-Date: 1545786454 2018/12/26 01:07:34 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.162 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1599,7 +1599,7 @@ boolean identified, all_containers, reportempty;
|
||||
if (Is_container(obj) || obj->otyp == STATUE)
|
||||
obj->cknown = obj->lknown = 1;
|
||||
}
|
||||
Strcpy(&buf[2], doname(obj));
|
||||
Strcpy(&buf[2], doname_with_price(obj));
|
||||
putstr(tmpwin, 0, buf);
|
||||
}
|
||||
unsortloot(&sortedcobj);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 shk.c $NHDT-Date: 1545785119 2018/12/26 00:45:19 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.146 $ */
|
||||
/* NetHack 3.6 shk.c $NHDT-Date: 1545786461 2018/12/26 01:07:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.147 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -1974,7 +1974,7 @@ register struct obj *obj;
|
||||
|
||||
if (*u.ushops && obj->oclass != COIN_CLASS
|
||||
&& obj != uball && obj != uchain
|
||||
&& get_obj_location(obj, &x, &y, 0)
|
||||
&& get_obj_location(obj, &x, &y, CONTAINED_TOO)
|
||||
&& *in_rooms(u.ux, u.uy, SHOPBASE) == *in_rooms(x, y, SHOPBASE)
|
||||
&& (shkp = shop_keeper(inside_shop(x, y))) != 0 && inhishop(shkp)) {
|
||||
cost = obj->no_charge ? 0L : obj->quan * get_cost(obj, shkp);
|
||||
|
||||
Reference in New Issue
Block a user