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:
@@ -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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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; /* mail is initialized */
|
||||||
boolean lan_mail_fetched; /* mail is awaiting display */
|
boolean lan_mail_fetched; /* mail is awaiting display */
|
||||||
#endif
|
#endif
|
||||||
|
boolean wizweight; /* display weight of everything in wizard mode */
|
||||||
/*
|
/*
|
||||||
* Window capability support.
|
* Window capability support.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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 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_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) \
|
#define FEATURE_NOTICE_VER(major, minor, patch) \
|
||||||
(((unsigned long) major << 24) | ((unsigned long) minor << 16) \
|
(((unsigned long) major << 24) | ((unsigned long) minor << 16) \
|
||||||
|
|||||||
@@ -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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -1042,7 +1042,7 @@ boolean with_price;
|
|||||||
|
|
||||||
/* show weight for items (debug tourist info)
|
/* show weight for items (debug tourist info)
|
||||||
* aum is stolen from Crawl's "Arbitrary Unit of Measure" */
|
* aum is stolen from Crawl's "Arbitrary Unit of Measure" */
|
||||||
if (wizard) {
|
if (wizard && iflags.wizweight) {
|
||||||
Sprintf(eos(bp), " (%d aum)", obj->owt);
|
Sprintf(eos(bp), " (%d aum)", obj->owt);
|
||||||
}
|
}
|
||||||
bp = strprepend(bp, prefix);
|
bp = strprepend(bp, prefix);
|
||||||
|
|||||||
@@ -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. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* 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 },
|
{ "mention_walls", &iflags.mention_walls, FALSE, SET_IN_GAME },
|
||||||
{ "menucolors", &iflags.use_menu_color, FALSE, SET_IN_GAME },
|
{ "menucolors", &iflags.use_menu_color, FALSE, SET_IN_GAME },
|
||||||
/* for menu debugging only*/
|
/* 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 },
|
{ "menu_objsyms", &iflags.menu_head_objsym, FALSE, SET_IN_GAME },
|
||||||
{ "mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME }, /*WC*/
|
{ "mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME }, /*WC*/
|
||||||
#ifdef NEWS
|
#ifdef NEWS
|
||||||
@@ -183,7 +183,7 @@ static struct Bool_Opt {
|
|||||||
DISP_IN_GAME },
|
DISP_IN_GAME },
|
||||||
#endif
|
#endif
|
||||||
{ "safe_pet", &flags.safe_dog, TRUE, SET_IN_GAME },
|
{ "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*/
|
{ "selectsaved", &iflags.wc2_selectsaved, TRUE, DISP_IN_GAME }, /*WC*/
|
||||||
{ "showexp", &flags.showexp, FALSE, SET_IN_GAME },
|
{ "showexp", &flags.showexp, FALSE, SET_IN_GAME },
|
||||||
{ "showrace", &flags.showrace, 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*/
|
{ "use_inverse", &iflags.wc_inverse, FALSE, SET_IN_GAME }, /*WC*/
|
||||||
#endif
|
#endif
|
||||||
{ "verbose", &flags.verbose, TRUE, SET_IN_GAME },
|
{ "verbose", &flags.verbose, TRUE, SET_IN_GAME },
|
||||||
|
{ "wizweight", &iflags.wizweight, FALSE, SET_IN_WIZGAME },
|
||||||
{ "wraptext", &iflags.wc2_wraptext, FALSE, SET_IN_GAME },
|
{ "wraptext", &iflags.wc2_wraptext, FALSE, SET_IN_GAME },
|
||||||
#ifdef ZEROCOMP
|
#ifdef ZEROCOMP
|
||||||
{ "zerocomp", &iflags.zerocomp,
|
{ "zerocomp", &iflags.zerocomp,
|
||||||
@@ -3554,12 +3555,11 @@ doset()
|
|||||||
for (i = 0; boolopt[i].name; i++)
|
for (i = 0; boolopt[i].name; i++)
|
||||||
if ((bool_p = boolopt[i].addr) != 0
|
if ((bool_p = boolopt[i].addr) != 0
|
||||||
&& ((boolopt[i].optflags == DISP_IN_GAME && pass == 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)
|
if (bool_p == &flags.female)
|
||||||
continue; /* obsolete */
|
continue; /* obsolete */
|
||||||
if (bool_p == &iflags.sanity_check && !wizard)
|
if (boolopt[i].optflags == SET_IN_WIZGAME && !wizard)
|
||||||
continue;
|
|
||||||
if (bool_p == &iflags.menu_tab_sep && !wizard)
|
|
||||||
continue;
|
continue;
|
||||||
if (is_wc_option(boolopt[i].name)
|
if (is_wc_option(boolopt[i].name)
|
||||||
&& !wc_supported(boolopt[i].name))
|
&& !wc_supported(boolopt[i].name))
|
||||||
@@ -3595,7 +3595,7 @@ doset()
|
|||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
startpass = DISP_IN_GAME;
|
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
|
/* spin through the options to find the biggest name
|
||||||
and adjust the format string accordingly if needed */
|
and adjust the format string accordingly if needed */
|
||||||
|
|||||||
Reference in New Issue
Block a user