]> granicus.if.org Git - nethack/commitdiff
fruit enlightenment
authorPatR <rankin@nethack.org>
Thu, 10 Dec 2015 08:36:01 +0000 (00:36 -0800)
committerPatR <rankin@nethack.org>
Thu, 10 Dec 2015 08:36:01 +0000 (00:36 -0800)
Move the 'if (wizard) { /* give feedback for named fruit */ }' code
in ^X/enlightenment into an #if DEBUG block, and expand the if (wizard)
predicate with '&& explicitdebug("fruit")' to require that 'fruit' be in
DEBUGFILES.  So, build with DEBUG enabled and run via
 |% DEBUGFILES='fruit' nethack
to get it back....

This isn't actually a bug fix and it isn't necessary for 3.6.1, but I
got tired of seeing ^X and end-of-game disclosure of attributes end with
three lines about fruit when I'm not doing anything with named fruit.

doc/fixes36.1
src/cmd.c

index 118e5fb5638a05238d74382a037d47ca9232435b..e84ba28173f618721ffb2dba8aac411df8212456 100644 (file)
@@ -6,6 +6,7 @@ doc/*.6 man pages and corresponding doc/*.txt text copies were out of date
 data.base entry for "lava" had wrong first name for Don Woods' attribution
 cursed genocide of "none" sent in monsters, but "that's enough tries" didn't
 update MAXPLAYERS documentation in sysconf file and allow 0 for it
+wizard mode: don't include feedback about named fruit for ^X and enlightenment
 
 
 Platform- and/or Interface-Specific Fixes
index 8fd20ef0c91af4068bc9edc1d6b957bb89c9e115..24d68b1d9704ca45d55648b8c12ab5a91413281d 100644 (file)
--- a/src/cmd.c
+++ b/src/cmd.c
@@ -1,4 +1,4 @@
-/* NetHack 3.6 cmd.c   $NHDT-Date: 1446975462 2015/11/08 09:37:42 $  $NHDT-Branch: master $:$NHDT-Revision: 1.206 $ */
+/* NetHack 3.6 cmd.c   $NHDT-Date: 1449736557 2015/12/10 08:35:57 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.208 $ */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -2245,8 +2245,10 @@ int final;
         }
     }
 
-    /* named fruit debugging (doesn't really belong here...) */
-    if (wizard) {
+#ifdef DEBUG
+    /* named fruit debugging (doesn't really belong here...); to enable,
+       include 'fruit' in DEBUGFILES list (even though it isn't a file...) */
+    if (wizard && explicitdebug("fruit")) {
         int fcount = 0;
         struct fruit *f;
         char buf2[BUFSZ];
@@ -2260,6 +2262,7 @@ int final;
         Sprintf(buf, "%d", flags.made_fruit);
         enl_msg("The made fruit flag ", "is ", "was ", buf, "");
     }
+#endif
 
     {
         const char *p;