]> granicus.if.org Git - nethack/commitdiff
reading covered T-shirt (trunk only)
authornethack.rankin <nethack.rankin>
Wed, 1 Apr 2009 00:52:30 +0000 (00:52 +0000)
committernethack.rankin <nethack.rankin>
Wed, 1 Apr 2009 00:52:30 +0000 (00:52 +0000)
     From a bug report, you could read
a worn T-shirt even when it was covered by a worn suit.

doc/fixes35.0
src/read.c

index af7154f5cb4f99215732539dbd421c0bbf8af717..a15bebcdd43ef0d8029a8cadda2fc00b043cef48 100644 (file)
@@ -318,6 +318,7 @@ prevent temple priests and minions from wearing helms of opposite alignment
 'D' drop command didn't handle 'u' choice correctly if the only unpaid items
        were inside containers
 pearl rings shouldn't rust
+shouldn't be able to read a worn T-shirt when it's covered by a worn suit
 
 
 Platform- and/or Interface-Specific Fixes
index 2ca34ce4c56ce3537de0499c369abcc509b26005..fe93c97c62b4fcd871e3cdf960e0e8d5a627d577 100644 (file)
@@ -96,6 +96,13 @@ doread()
                You_cant("feel any Braille writing.");
                return 0;
            }
+           /* can't read shirt worn under suit (under cloak is ok though) */
+           if (uarm && scroll == uarmu) {
+               pline("%s shirt is obscured by %s%s.",
+                     scroll->unpaid ? "That" : "Your",
+                     shk_your(buf, uarm), suit_simple_name(uarm));
+               return 0;
+           }
            u.uconduct.literate++;
            if(flags.verbose)
                pline("It reads:");