fix pull request #526 - 'menucolor' help message
being given when it shouldn't be. A change for perm_invent handling back in March screwed up the if/then/else logic for code executed when finishing MENUCOLOR manipulation via the 'O' command. That resulted in the reminder to set menucolors to True being given even when it was already True if perm_invent happened to be False. I noticed this myself recently, then neglected to investigate it or even write it down anywhere. Fixes #526
This commit is contained in:
@@ -702,6 +702,9 @@ applying a book to check readability treated novels as if they were spellbooks
|
||||
error (example was an attempt to interactively set bouldersym to an
|
||||
invalid value), the error reporting routine crashed via segfault
|
||||
lighting for baalz level defaulted to random and could end up being lit
|
||||
when using 'O' to set menu color patterns, the reminder message that the
|
||||
boolean menucolors option needs to be set to True for them to work
|
||||
was sometimes given even when already True
|
||||
|
||||
curses: 'msg_window' option wasn't functional for curses unless the binary
|
||||
also included tty support
|
||||
|
||||
@@ -5049,14 +5049,16 @@ handler_menu_colors(void)
|
||||
inventory window; we don't track whether an actual changed
|
||||
occurred, so just assume there was one and that it matters;
|
||||
if we're wrong, a redundant update is cheap... */
|
||||
if (iflags.use_menu_color && iflags.perm_invent)
|
||||
update_inventory();
|
||||
if (iflags.use_menu_color) {
|
||||
if (iflags.perm_invent)
|
||||
update_inventory();
|
||||
|
||||
/* menu colors aren't being used; if any are defined, remind
|
||||
player how to use them */
|
||||
else if (nmc > 0)
|
||||
/* menu colors aren't being used yet; if any MENUCOLOR rules are
|
||||
defined, remind player how to activate them */
|
||||
} else if (nmc > 0) {
|
||||
pline(
|
||||
"To have menu colors become active, toggle 'menucolors' option to True.");
|
||||
}
|
||||
return optn_ok;
|
||||
|
||||
} else if (opt_idx == 0) { /* add new */
|
||||
|
||||
Reference in New Issue
Block a user