From: Pasi Kallinen Date: Wed, 27 May 2015 09:46:31 +0000 (+0300) Subject: Add omit_buc -option X-Git-Tag: NetHack-3.6.0_RC01~351 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5fabcdf69229ce4c50cdfb5925af84df380a5011;p=nethack Add omit_buc -option The option defaults to on, which is the old-style behaviour. Turning the option off will never omit the "uncursed" -status from inventory lines. This is pretty much required if users want to use menucolors based on the BUC state. --- diff --git a/dat/opthelp b/dat/opthelp index 1cffdeb73..54a348b73 100644 --- a/dat/opthelp +++ b/dat/opthelp @@ -24,6 +24,7 @@ mail enable the mail daemon [TRUE] null allow nulls to be sent to your terminal [TRUE] try turning this option off (forcing NetHack to use its own delay code) if moving objects seem to teleport across rooms +omit_buc omit "uncursed" from inventory, if possible [TRUE] perm_invent keep inventory in a permanent window [FALSE] pickup_thrown override pickup_types for thrown objects [TRUE] pushweapon when wielding a new weapon, put your previously diff --git a/doc/Guidebook.mn b/doc/Guidebook.mn index 3dabeefef..7315631b0 100644 --- a/doc/Guidebook.mn +++ b/doc/Guidebook.mn @@ -2196,6 +2196,8 @@ location of the `y' and `z' keys swapped.) When moving by numbers, to enter a count prefix for those commands which accept one (such as ``12s'' to search twelve times), precede it with the letter `n' (``n12s''). +.lp omit_buc +Omit "uncursed" from inventory lists, if possible (default on). .lp packorder Specify the order to list object types in (default ``")[%?+!=/(*`0_''). The value of this option should be a string containing the diff --git a/doc/Guidebook.tex b/doc/Guidebook.tex index 18a4913c8..f9fb923bc 100644 --- a/doc/Guidebook.tex +++ b/doc/Guidebook.tex @@ -2641,6 +2641,9 @@ When moving by numbers, to enter a count prefix for those commands which accept one (such as ``{\tt 12s}'' to search twelve times), precede it with the letter `{\tt n}' (``{\tt n12s}''). %.lp +\item[\ib{omit\_buc}] +Omit ``uncursed'' from inventory lists, if possible (default on). +%.lp \item[\ib{packorder}] Specify the order to list object types in (default ``\verb&")[%?+!=/(*`0_&''). The value of this option should be a string diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 4180fd84c..57a903be3 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -918,6 +918,7 @@ long worms can no longer be leashed the chest in the Castle containing the wishing wand can never be trapped the vibrating square is now a trap mimics wouldn't take on the form of "strange object" +add an option to prevent omitting the uncursed status from inventory Platform- and/or Interface-Specific Fixes diff --git a/include/flag.h b/include/flag.h index 3c5b14e9b..e849549af 100644 --- a/include/flag.h +++ b/include/flag.h @@ -194,6 +194,7 @@ struct instance_flags { boolean deferred_X; /* deferred entry into explore mode */ boolean num_pad; /* use numbers for movement commands */ boolean news; /* print news */ + boolean omit_buc; /* omit "uncursed" status in inventory lists */ boolean mention_walls; /* give feedback when bumping walls */ boolean menu_tab_sep; /* Use tabs to separate option menu fields */ boolean menu_head_objsym; /* Show obj symbol in menu headings */ diff --git a/src/objnam.c b/src/objnam.c index 51efcdf3f..45a87c8ae 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -778,7 +778,7 @@ register struct obj *obj; Strcat(prefix, "cursed "); else if (obj->blessed) Strcat(prefix, "blessed "); - else if ((!known || !objects[obj->otyp].oc_charged + else if (!iflags.omit_buc || (!known || !objects[obj->otyp].oc_charged || (obj->oclass == ARMOR_CLASS || obj->oclass == RING_CLASS)) /* For most items with charges or +/-, if you know how many diff --git a/src/options.c b/src/options.c index 59b0796de..78bd23398 100644 --- a/src/options.c +++ b/src/options.c @@ -154,6 +154,7 @@ static struct Bool_Opt { #endif { "nudist", &u.uroleplay.nudist, FALSE, DISP_IN_GAME }, { "null", &flags.null, TRUE, SET_IN_GAME }, + { "omit_buc", &iflags.omit_buc, TRUE, SET_IN_GAME }, #if defined(SYSFLAGS) && defined(MAC) { "page_wait", &sysflags.page_wait, TRUE, SET_IN_GAME }, #else