wizweight optional

Changes to be committed:
	modified:   include/flag.h
	modified:   include/hack.h
	modified:   src/objnam.c
	modified:   src/options.c
This commit is contained in:
nhmall
2016-01-01 16:17:46 -05:00
parent 8e7e79448e
commit c70d466325
4 changed files with 15 additions and 13 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 flag.h $NHDT-Date: 1435002669 2015/06/22 19:51:09 $ $NHDT-Branch: master $:$NHDT-Revision: 1.89 $ */
/* NetHack 3.6 flag.h $NHDT-Date: 1451683047 2016/01/01 21:17:27 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.93 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -259,6 +259,7 @@ struct instance_flags {
boolean lan_mail; /* mail is initialized */
boolean lan_mail_fetched; /* mail is awaiting display */
#endif
boolean wizweight; /* display weight of everything in wizard mode */
/*
* Window capability support.
*/

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 hack.h $NHDT-Date: 1434056948 2015/06/11 21:09:08 $ $NHDT-Branch: master $:$NHDT-Revision: 1.66 $ */
/* NetHack 3.6 hack.h $NHDT-Date: 1451683048 2016/01/01 21:17:28 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.68 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -374,7 +374,8 @@ NEARDATA extern coord bhitpos; /* place where throw or zap hits or stops */
#define DISP_IN_GAME 3 /* may be set via extern program, displayed in game \
*/
#define SET_IN_GAME 4 /* may be set via extern program or set in the game */
#define SET__IS_VALUE_VALID(s) ((s < SET_IN_SYS) || (s > SET_IN_GAME))
#define SET_IN_WIZGAME 5 /* may be set set in the game if wizmode */
#define SET__IS_VALUE_VALID(s) ((s < SET_IN_SYS) || (s > SET_IN_WIZGAME))
#define FEATURE_NOTICE_VER(major, minor, patch) \
(((unsigned long) major << 24) | ((unsigned long) minor << 16) \

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 objnam.c $NHDT-Date: 1450584419 2015/12/20 04:06:59 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.159 $ */
/* NetHack 3.6 objnam.c $NHDT-Date: 1451683056 2016/01/01 21:17:36 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.162 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -1042,7 +1042,7 @@ boolean with_price;
/* show weight for items (debug tourist info)
* aum is stolen from Crawl's "Arbitrary Unit of Measure" */
if (wizard) {
if (wizard && iflags.wizweight) {
Sprintf(eos(bp), " (%d aum)", obj->owt);
}
bp = strprepend(bp, prefix);

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 options.c $NHDT-Date: 1449830206 2015/12/11 10:36:46 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.244 $ */
/* NetHack 3.6 options.c $NHDT-Date: 1451683057 2016/01/01 21:17:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.249 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
@@ -147,7 +147,7 @@ static struct Bool_Opt {
{ "mention_walls", &iflags.mention_walls, FALSE, SET_IN_GAME },
{ "menucolors", &iflags.use_menu_color, FALSE, SET_IN_GAME },
/* for menu debugging only*/
{ "menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME },
{ "menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_WIZGAME },
{ "menu_objsyms", &iflags.menu_head_objsym, FALSE, SET_IN_GAME },
{ "mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME }, /*WC*/
#ifdef NEWS
@@ -183,7 +183,7 @@ static struct Bool_Opt {
DISP_IN_GAME },
#endif
{ "safe_pet", &flags.safe_dog, TRUE, SET_IN_GAME },
{ "sanity_check", &iflags.sanity_check, FALSE, SET_IN_GAME },
{ "sanity_check", &iflags.sanity_check, FALSE, SET_IN_WIZGAME },
{ "selectsaved", &iflags.wc2_selectsaved, TRUE, DISP_IN_GAME }, /*WC*/
{ "showexp", &flags.showexp, FALSE, SET_IN_GAME },
{ "showrace", &flags.showrace, FALSE, SET_IN_GAME },
@@ -220,6 +220,7 @@ static struct Bool_Opt {
{ "use_inverse", &iflags.wc_inverse, FALSE, SET_IN_GAME }, /*WC*/
#endif
{ "verbose", &flags.verbose, TRUE, SET_IN_GAME },
{ "wizweight", &iflags.wizweight, FALSE, SET_IN_WIZGAME },
{ "wraptext", &iflags.wc2_wraptext, FALSE, SET_IN_GAME },
#ifdef ZEROCOMP
{ "zerocomp", &iflags.zerocomp,
@@ -3554,12 +3555,11 @@ doset()
for (i = 0; boolopt[i].name; i++)
if ((bool_p = boolopt[i].addr) != 0
&& ((boolopt[i].optflags == DISP_IN_GAME && pass == 0)
|| (boolopt[i].optflags == SET_IN_GAME && pass == 1))) {
|| (boolopt[i].optflags == SET_IN_GAME && pass == 1)
|| (boolopt[i].optflags == SET_IN_WIZGAME && pass == 1 && wizard))) {
if (bool_p == &flags.female)
continue; /* obsolete */
if (bool_p == &iflags.sanity_check && !wizard)
continue;
if (bool_p == &iflags.menu_tab_sep && !wizard)
if (boolopt[i].optflags == SET_IN_WIZGAME && !wizard)
continue;
if (is_wc_option(boolopt[i].name)
&& !wc_supported(boolopt[i].name))
@@ -3595,7 +3595,7 @@ doset()
else
#endif
startpass = DISP_IN_GAME;
endpass = SET_IN_GAME;
endpass = (wizard) ? SET_IN_WIZGAME : SET_IN_GAME;
/* spin through the options to find the biggest name
and adjust the format string accordingly if needed */