From: PatR Date: Wed, 28 Jun 2017 01:11:00 +0000 (-0700) Subject: set 'bouldersym' via 'O' X-Git-Tag: NetHack-3.6.1_RC01~464 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=27c24536af25952ec2a4b45f3ad7ecc77762ff45;p=nethack set 'bouldersym' via 'O' Reinstate the deprecated 'bouldersym' option for the 'O' command instead of just showing the set-at-start-of-play value. I leave boulder with the default value except when attempting to solve Sokoban, and it's a pain to have to save, edit config file or reset NEHTACKOPTIONS, then restore in order to change the boulder symbol, then do that all over again once leaving Sokoban. If using the default symbols, a custom symbol set which just sets boulder will work, but with {DEC|IBM}graphics that's no help because the unspecified symbols revert to their default values. --- diff --git a/src/options.c b/src/options.c index 03523f631..b7ee5f0ba 100644 --- a/src/options.c +++ b/src/options.c @@ -266,7 +266,7 @@ static struct Comp_Opt { { "altkeyhandler", "alternate key handler", 20, DISP_IN_GAME }, #ifdef BACKWARD_COMPAT { "boulder", "deprecated (use S_boulder in sym file instead)", 1, - SET_IN_FILE }, + SET_IN_GAME }, #endif { "catname", "the name of your (first) cat (e.g., catname:Tabby)", PL_PSIZ, DISP_IN_GAME }, @@ -2442,8 +2442,12 @@ boolean tinitial, tfrom_file; */ iflags.bouldersym = (uchar) opts[0]; } - if (!initial) + /* for 'initial', update_bouldersym() is done in initoptions_finish(), + after all symset options have been processed */ + if (!initial) { + update_bouldersym(); need_redraw = TRUE; + } return; } #endif @@ -4693,7 +4697,8 @@ boolean setinitial, setfromfile; } sl = sl->next; } - Sprintf(buf, "Select %ssymbol set:", rogueflag ? "rogue level " : ""); + Sprintf(buf, "Select %ssymbol set:", + rogueflag ? "rogue level " : ""); end_menu(tmpwin, buf); if (select_menu(tmpwin, PICK_ONE, &symset_pick) > 0) { chosen = symset_pick->item.a_int - 2;