From 3be4e49552a94d303004fe0bdc267cada94e06fd Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 23 Feb 2021 02:42:28 -0800 Subject: [PATCH] [lack of] autopickup inside shops When being inside a shop inhibits autopickup, menion that in ^X feedback about autopickup. --- doc/fixes37.0 | 3 ++- src/insight.c | 21 +++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index dcc2d36ab..3f32841f2 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.461 $ $NHDT-Date: 1614074653 2021/02/23 10:04:13 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.462 $ $NHDT-Date: 1614076940 2021/02/23 10:42:20 $ General Fixes and Modified Features ----------------------------------- @@ -386,6 +386,7 @@ when an explosion scatters objects, make any that fly over sinks stop there output message when changing fastmove mode while cursor targetting messages when Minetown watchmen become angry could report "you see an angry guard approaching" even if he was invisible and hero can't see invis +when autopickup is on but disabled due to being inside a shop, have ^X say so Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/insight.c b/src/insight.c index 7df49eabe..aabde690b 100644 --- a/src/insight.c +++ b/src/insight.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 insight.c $NHDT-Date: 1608115734 2020/12/16 10:48:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.23 $ */ +/* NetHack 3.7 insight.c $NHDT-Date: 1614076940 2021/02/23 10:42:20 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.33 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -614,13 +614,18 @@ basics_enlightenment(int mode UNUSED, int final) char ocl[MAXOCLASSES + 1]; Strcpy(buf, "on"); - oc_to_str(flags.pickup_types, ocl); - Sprintf(eos(buf), " for %s%s%s", - *ocl ? "'" : "", *ocl ? ocl : "all types", *ocl ? "'" : ""); - if (flags.pickup_thrown && *ocl) /* *ocl: don't show if 'all types' */ - Strcat(buf, " plus thrown"); - if (g.apelist) - Strcat(buf, ", with exceptions"); + if (costly_spot(u.ux, u.uy)) { + /* being in a shop inhibits autopickup, even 'pickup_thrown' */ + Strcat(buf, ", but temporarily disabled while inside the shop"); + } else { + oc_to_str(flags.pickup_types, ocl); + Sprintf(eos(buf), " for %s%s%s", *ocl ? "'" : "", + *ocl ? ocl : "all types", *ocl ? "'" : ""); + if (flags.pickup_thrown && *ocl) + Strcat(buf, " plus thrown"); /* show when not 'all types' */ + if (g.apelist) + Strcat(buf, ", with exceptions"); + } } else Strcpy(buf, "off"); enl_msg("Autopickup ", "is ", "was ", buf, ""); -- 2.50.1