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.
This commit is contained in:
PatR
2015-12-10 00:36:01 -08:00
parent f4a6ccf3f0
commit c14336fee2
2 changed files with 7 additions and 3 deletions

View File

@@ -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;