From 35d9a7c9782d79ccfc2de08efbcfc996b9b2cf9e Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Wed, 1 Apr 2009 00:52:30 +0000 Subject: [PATCH] reading covered T-shirt (trunk only) From a bug report, you could read a worn T-shirt even when it was covered by a worn suit. --- doc/fixes35.0 | 1 + src/read.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/doc/fixes35.0 b/doc/fixes35.0 index af7154f5c..a15bebcdd 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -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 diff --git a/src/read.c b/src/read.c index 2ca34ce4c..fe93c97c6 100644 --- a/src/read.c +++ b/src/read.c @@ -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:");