]> granicus.if.org Git - nethack/commitdiff
fix github issue #399 - [not] fixing chest lock
authorPatR <rankin@nethack.org>
Sat, 10 Oct 2020 18:46:02 +0000 (11:46 -0700)
committerPatR <rankin@nethack.org>
Sat, 10 Oct 2020 18:46:02 +0000 (11:46 -0700)
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 <foo>."  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.

doc/fixes37.0
src/lock.c

index 56101a98d4d34974e3a3ca71b6ebeddb54885c3e..0c1d1ea4df25c4414b4fd5576675638503bf04d7 100644 (file)
@@ -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
index ceb430941c69268d5aee65237e135b8930cd9c71..b142568567ce23ed41b29d8450ac935e0dc54798 100644 (file)
@@ -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 */