m #optionsfull
Preceding #options or the key bound to that with m runs 'advanced' options. Implement the inverse: preceding #optionsfull or the key bound to that with m now runs 'simple' options.
This commit is contained in:
@@ -2552,10 +2552,12 @@ struct ext_func_tab extcmdlist[] = {
|
||||
dosacrifice, AUTOCOMPLETE | CMD_M_PREFIX, NULL },
|
||||
{ 'o', "open", "open a door",
|
||||
doopen, 0, NULL },
|
||||
/* 'm #options' runs doset() */
|
||||
{ 'O', "options", "show option settings",
|
||||
doset_simple, IFBURIED | GENERALCMD | CMD_M_PREFIX, NULL },
|
||||
/* 'm #optionsfull' runs doset_simple() */
|
||||
{ '\0', "optionsfull", "show all option settings, possibly change them",
|
||||
doset, IFBURIED | GENERALCMD, NULL },
|
||||
doset, IFBURIED | GENERALCMD | CMD_M_PREFIX, NULL },
|
||||
/* #overview used to need autocomplete and has retained that even
|
||||
after being assigned to ^O [old wizard mode ^O is now #wizwhere] */
|
||||
{ C('o'), "overview", "show a summary of the explored dungeon",
|
||||
|
||||
@@ -7895,8 +7895,12 @@ doset_simple(void)
|
||||
boolean *bool_p;
|
||||
const char *name;
|
||||
|
||||
if (iflags.menu_requested)
|
||||
if (iflags.menu_requested) {
|
||||
/* doset() checks for 'm' and calls doset_simple(); clear the
|
||||
menu-requested flag to avoid doing that recursively */
|
||||
iflags.menu_requested = FALSE;
|
||||
return doset();
|
||||
}
|
||||
|
||||
if (!made_fmtstr) {
|
||||
Sprintf(fmtstr_doset, "%%s%%-%us [%%s]",
|
||||
@@ -8054,6 +8058,13 @@ doset(void) /* changing options via menu by Per Liboriussen */
|
||||
gavehelp = FALSE, skiphelp = !iflags.cmdassist;
|
||||
int clr = 0;
|
||||
|
||||
if (iflags.menu_requested) {
|
||||
/* doset_simple() checks for 'm' and calls doset(); clear the
|
||||
menu-requested flag to avoid doing that recursively */
|
||||
iflags.menu_requested = FALSE;
|
||||
return doset_simple();
|
||||
}
|
||||
|
||||
/* if we offer '?' as a choice and it is the only thing chosen,
|
||||
we'll end up coming back here after showing the explanatory text */
|
||||
rerun:
|
||||
|
||||
Reference in New Issue
Block a user