From: PatR Date: Thu, 10 Dec 2015 08:36:01 +0000 (-0800) Subject: fruit enlightenment X-Git-Tag: NetHack-3.6.1_RC01~1198 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c14336fee204bc1577b8014eb8a74e6116baf774;p=nethack fruit enlightenment 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. --- diff --git a/doc/fixes36.1 b/doc/fixes36.1 index 118e5fb56..e84ba2817 100644 --- a/doc/fixes36.1 +++ b/doc/fixes36.1 @@ -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 diff --git a/src/cmd.c b/src/cmd.c index 8fd20ef0c..24d68b1d9 100644 --- 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;