From: PatR Date: Sat, 10 Oct 2020 18:46:02 +0000 (-0700) Subject: fix github issue #399 - [not] fixing chest lock X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=062152d62ed25400e19af4298c60f1b832e3eb16;p=nethack fix github issue #399 - [not] fixing chest lock Use ansimpleoname() instead of doname() to describe the key or lock pick or credit card when reporting "You can't fix a chest's broken lock with a ." doname() includes BUC status when known and feedback mentioning a particular bless/curse state on the tool that can't be used to fix the lock suggests that some other bless/curse state might be viable. --- diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 56101a98d..0c1d1ea4d 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.325 $ $NHDT-Date: 1602270140 2020/10/09 19:02:20 $ +NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.326 $ $NHDT-Date: 1602355548 2020/10/10 18:45:48 $ General Fixes and Modified Features ----------------------------------- @@ -272,6 +272,10 @@ for multiple drop ('D') with menustyle traditional or combination, if the only object class player picked was '$' then it operated on all classes small monsters could seep through their shirt don't snuff brass lantern when it's hit by water unless it is submerged +when reporting that hero can't repair a chest's broken lock with key/pick/card + just describe the base item without BUC, user assigned name, &c since + "You can't repair a chest's lock with an uncursed key." implicitly + suggests that you might be able to do so with a blessed or cursed one Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/lock.c b/src/lock.c index ceb430941..b14256856 100644 --- a/src/lock.c +++ b/src/lock.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 lock.c $NHDT-Date: 1596498173 2020/08/03 23:42:53 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.99 $ */ +/* NetHack 3.7 lock.c $NHDT-Date: 1602355548 2020/10/10 18:45:48 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.100 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -480,7 +480,8 @@ struct obj *container; /* container, for autounlock */ } if (otmp->obroken) { - You_cant("fix its broken lock with %s.", doname(pick)); + You_cant("fix its broken lock with %s.", + ansimpleoname(pick)); return PICKLOCK_LEARNED_SOMETHING; } else if (picktyp == CREDIT_CARD && !otmp->olocked) { /* credit cards are only good for unlocking */