diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 73c66e65d..5fb21cb77 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -527,6 +527,9 @@ fix 'object lost' panic if hero with lycanthropy but in human form is wielding prevent segfault if pline() is called recursively (which could happen if the interface code issues a debugpline() while processing putstr()) open at yourself is the same as #loot +when #force reports that a chest's lock is already broken or already unlocked, + force it to be described as "a chest", even when its lock state is + already known, rather than as "a broken chest" or "an unlocked chest" Fixes to Post-3.6.0 Problems that Were Exposed Via git Repository diff --git a/src/lock.c b/src/lock.c index 996784ca7..9de1e29c5 100644 --- a/src/lock.c +++ b/src/lock.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 lock.c $NHDT-Date: 1521377334 2018/03/18 12:48:54 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.78 $ */ +/* NetHack 3.6 lock.c $NHDT-Date: 1521499715 2018/03/19 22:48:35 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.80 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -549,8 +549,13 @@ doforce() for (otmp = level.objects[u.ux][u.uy]; otmp; otmp = otmp->nexthere) if (Is_box(otmp)) { if (otmp->obroken || !otmp->olocked) { - There("is %s here, but its lock is already %s.", doname(otmp), - otmp->obroken ? "broken" : "unlocked"); + /* force doname() to omit known "broken" or "unlocked" + prefix so that the message isn't worded redundantly; + since we're about to set lknown, there's no need to + remember and then reset its current value */ + otmp->lknown = 0; + There("is %s here, but its lock is already %s.", + doname(otmp), otmp->obroken ? "broken" : "unlocked"); otmp->lknown = 1; continue; }