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:
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user