]> granicus.if.org Git - nethack/commitdiff
broken large box wording change
authornhmall <nhmall@nethack.org>
Sun, 18 Mar 2018 03:05:52 +0000 (23:05 -0400)
committernhmall <nhmall@nethack.org>
Sun, 18 Mar 2018 03:05:52 +0000 (23:05 -0400)
> When you try to #force a large box or chest whose lock is already broken from a
> previous #force, the game tells you "There is a broken large box here, but its
> lock is already broken." It's minor, but this implies that the box being broken
> is separate from the lock being broken (as well as that the box itself *can* be
> broken).

change the wording to "lock-damaged box" and suppress
", but its lock is aleady broken" when "lock-damaged box" has
already been displayed.

(Nobody particularly likes the wording "lock-damaged box" either, but at least
it seems less misleading)

doc/fixes36.1
src/lock.c
src/objnam.c

index 73c66e65d6403d542e2ca0090a3ce38cb9940795..ce3ebc86e8de7fa66751ab5a2ed1eeeaf4a4c46e 100644 (file)
@@ -609,6 +609,8 @@ when clairvoyance lets you move the cursor to examine the map (if it occurs
 prevent Mjollnir from being auto-quivered if it's been thrown without return
        and then picked back up while quiver slot is empty
 plural of "fox" is not "foxen"
+change wording from "broken chest" to "lock-damaged chest" and suppress #force
+       ", but its lock is already broken" when lock-damaged was already shown
 
 
 Platform- and/or Interface-Specific Fixes
index 594351124a6733f768ee63a742d8d5e3f0419383..99f6c75c9e4758cdd050523e31d507b88479797d 100644 (file)
@@ -548,9 +548,18 @@ doforce()
     xlock.box = (struct obj *) 0;
     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");
+            if (otmp->obroken) {
+                There("is %s here%s.", doname(otmp),
+                      /* The displayed name will have already been prefixed
+                       * with "lock-damaged" if otmp->lknown is already set
+                       * so suppress the additional notification about the
+                       * lock in that case. */
+                      !otmp->lknown ? ", but its lock is already broken" : "");
+                otmp->lknown = 1;
+                continue;
+            } else if (!otmp->olocked) {
+                There("is %s here, but its lock is already unlocked.",
+                      doname(otmp));
                 otmp->lknown = 1;
                 continue;
             }
index aea4ec56846e02d28da00456e46802b9af65f455..88d105d41157c51741d87f0170bedc73c4d0dd76 100644 (file)
@@ -998,7 +998,7 @@ unsigned doname_flags;
             /* 3.6.0 used "unlockable" here but that could be misunderstood
                to mean "capable of being unlocked" rather than the intended
                "not capable of being locked" */
-            Strcat(prefix, "broken ");
+            Strcat(prefix, "lock-damaged ");
         else if (obj->olocked)
             Strcat(prefix, "locked ");
         else