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 <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.
This commit is contained in:
PatR
2020-10-10 11:46:02 -07:00
parent 55d1d547a6
commit 062152d62e
2 changed files with 8 additions and 3 deletions

View 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

View 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 */