From 3165f7af8d1b540a8d81d49661fc87d756ecf893 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 13 Dec 2018 16:54:52 -0800 Subject: [PATCH 1/6] spell "autopickup" consistently The '@' command doesn't hyphenate 'auto-pickup' so 'O' and ^X shouldn't either. --- src/cmd.c | 4 ++-- src/options.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cmd.c b/src/cmd.c index 579e4810b..2049aec5a 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1544695944 2018/12/13 10:12:24 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.318 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1544748881 2018/12/14 00:54:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.319 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2034,7 +2034,7 @@ int final; Strcat(buf, ", with exceptions"); } else Strcpy(buf, "off"); - enl_msg("Auto-pickup ", "is ", "was ", buf, ""); + enl_msg("Autopickup ", "is ", "was ", buf, ""); } /* characteristics: expanded version of bottom line strength, dexterity, &c */ diff --git a/src/options.c b/src/options.c index 6419c55f0..218f5c2f0 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1544669666 2018/12/13 02:54:26 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.344 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1544748881 2018/12/14 00:54:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.345 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3001,7 +3001,7 @@ boolean tinitial, tfrom_file; use_menu = TRUE; } if (use_menu) { - (void) choose_classes_menu("Auto-Pickup what?", 1, TRUE, ocl, + (void) choose_classes_menu("Autopickup what?", 1, TRUE, ocl, tbuf); op = tbuf; } From 36d27b11bdeeaa2aa60bc6c944c3216bead4fa74 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 13 Dec 2018 20:07:22 -0500 Subject: [PATCH 2/6] pdcurses expected objs Match the required curses obj's in most recent updates from git clone https://git.code.sf.net/p/pdcurses/code pdcurses --- sys/winnt/Makefile.msc | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index c207f254c..3b9f25882 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -73,8 +73,8 @@ DEBUGINFO = Y # PDCurses header (.h) files and PDCURSES_C to the location # of your PDCurses C files. # -#ADD_CURSES=Y -#PDCURSES_TOP=..\..\pdcurses +ADD_CURSES=Y +PDCURSES_TOP=..\..\pdcurses # #============================================================================== # This marks the end of the BUILD DECISIONS section. @@ -291,22 +291,23 @@ OPTIONS_FILE = $(DAT)\options #========================================== # PDCurses build macros #========================================== + PDCURSES_CURSES_H = $(PDCURSES_TOP)\curses.h PDCURSES_CURSPRIV_H = $(PDCURSES_TOP)\curspriv.h PDCURSES_HEADERS = $(PDCURSES_CURSES_H) $(PDCURSES_CURSPRIV_H) PDCSRC = $(PDCURSES_TOP)\pdcurses PDCWINCON = $(PDCURSES_TOP)\wincon -PDCLIBOBJS = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o \ - $(O)bkgd.o $(O)border.o $(O)clear.o $(O)color.o $(O)delch.o $(O)deleteln.o \ - $(O)deprec.o $(O)getch.o $(O)getstr.o $(O)getyx.o $(O)inch.o $(O)inchstr.o \ - $(O)initscr.o $(O)inopts.o $(O)insch.o $(O)insstr.o $(O)instr.o $(O)kernel.o \ - $(O)keyname.o $(O)mouse.o $(O)move.o $(O)outopts.o $(O)overlay.o $(O)pad.o \ + +PDCLIBOBJS = $(O)addch.o $(O)addchstr.o $(O)addstr.o $(O)attr.o $(O)beep.o \ + $(O)bkgd.o $(O)border.o $(O)clear.o $(O)color.o $(O)delch.o $(O)deleteln.o \ + $(O)getch.o $(O)getstr.o $(O)getyx.o $(O)inch.o $(O)inchstr.o \ + $(O)initscr.o $(O)inopts.o $(O)insch.o $(O)insstr.o $(O)instr.o $(O)kernel.o \ + $(O)keyname.o $(O)mouse.o $(O)move.o $(O)outopts.o $(O)overlay.o $(O)pad.o \ $(O)panel.o $(O)printw.o $(O)refresh.o $(O)scanw.o $(O)scr_dump.o $(O)scroll.o \ - $(O)slk.o $(O)termattr.o $(O)terminfo.o $(O)touch.o $(O)util.o $(O)window.o \ - $(O)debug.o + $(O)slk.o $(O)termattr.o $(O)touch.o $(O)util.o $(O)window.o $(O)debug.o PDCOBJS = $(O)pdcclip.o $(O)pdcdisp.o $(O)pdcgetsc.o $(O)pdckbd.o $(O)pdcscrn.o \ - $(O)pdcsetsc.o $(O)pdcutil.o + $(O)pdcsetsc.o $(O)pdcutil.o PDCLIB = $(O)pdcurses.lib From 5e37d5b5d46d67f4ec855b0b9ae3b08d6d2e81a0 Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 13 Dec 2018 20:11:03 -0500 Subject: [PATCH 3/6] commented out by default --- sys/winnt/Makefile.msc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/winnt/Makefile.msc b/sys/winnt/Makefile.msc index 3b9f25882..d3bcd140c 100644 --- a/sys/winnt/Makefile.msc +++ b/sys/winnt/Makefile.msc @@ -73,8 +73,8 @@ DEBUGINFO = Y # PDCurses header (.h) files and PDCURSES_C to the location # of your PDCurses C files. # -ADD_CURSES=Y -PDCURSES_TOP=..\..\pdcurses +#ADD_CURSES=Y +#PDCURSES_TOP=..\..\pdcurses # #============================================================================== # This marks the end of the BUILD DECISIONS section. From bdae51503c47c08ac701d9eb25e93e6fea90998d Mon Sep 17 00:00:00 2001 From: nhmall Date: Thu, 13 Dec 2018 20:21:26 -0500 Subject: [PATCH 4/6] stale dependency --- sys/unix/Makefile.src | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sys/unix/Makefile.src b/sys/unix/Makefile.src index 07d5d5920..95867d69e 100644 --- a/sys/unix/Makefile.src +++ b/sys/unix/Makefile.src @@ -740,8 +740,7 @@ $(HACK_H): ../include/hack.h $(CONFIG_H) ../include/lint.h ../include/align.h \ # tos.o: ../sys/atari/tos.c $(HACK_H) ../include/tcap.h $(CC) $(CFLAGS) -c ../sys/atari/tos.c -pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h \ - #../include/win32api.h +pcmain.o: ../sys/share/pcmain.c $(HACK_H) ../include/dlb.h $(CC) $(CFLAGS) -c ../sys/share/pcmain.c pcsys.o: ../sys/share/pcsys.c $(HACK_H) $(CC) $(CFLAGS) -c ../sys/share/pcsys.c From d18ddb2c95169309cca86dbbfe2cd6a750ccf664 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 13 Dec 2018 17:33:46 -0800 Subject: [PATCH 5/6] more interactive !pickup_types More on clearing pickup_types so that autopickup reverts to picking up evertyhing: for menustyle:Full and Partial, add a menu entry for 'all classes' as an alternative to unselecting every class already set. Also, Full and Partial had no way to include venom. Now it's a choice when in wizard mode. There's still no way--other than switching to Traditional or Combination--during normal play (where venom objects can exist if they were wished for in wizard mode and then left in bones). --- doc/fixes36.2 | 3 +++ src/options.c | 22 +++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/doc/fixes36.2 b/doc/fixes36.2 index 26305aacf..6be566c8d 100644 --- a/doc/fixes36.2 +++ b/doc/fixes36.2 @@ -268,6 +268,9 @@ if levitating hero poly'd into pass-wall creature jumped or teleported from blocking of levitation wasn't updated properly clairvoyance revealing underwater or under-lava objects left object displayed instead of restoring the water or lava +make it easier to clear 'pickup_types' (menustyles Traditional and Combination + could do so by setting it to 'a'; now ' ' works too; Full and Partial + allowed unselecting every object class; now 'all classes' is a choice) Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository diff --git a/src/options.c b/src/options.c index 218f5c2f0..4c4d3f4ad 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1544748881 2018/12/14 00:54:41 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.345 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1544751219 2018/12/14 01:33:39 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.346 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -3001,6 +3001,8 @@ boolean tinitial, tfrom_file; use_menu = TRUE; } if (use_menu) { + if (wizard && !index(ocl, VENOM_SYM)) + strkitten(ocl, VENOM_SYM); (void) choose_classes_menu("Autopickup what?", 1, TRUE, ocl, tbuf); op = tbuf; @@ -6329,10 +6331,28 @@ char *class_select; break; } } + if (category == 1 && next_accelerator <= 'z') { + /* for objects, add "A - ' ' all classes", after a separator */ + any = zeroany; + add_menu(win, NO_GLYPH, &any, 0, 0, ATR_NONE, "", MENU_UNSELECTED); + any.a_int = (int) ' '; + Sprintf(buf, "%c %s", (char) any.a_int, "all classes of objects"); + /* we won't preselect this even if the incoming list is empty; + having it selected means that it would have to be explicitly + de-selected in order to select anything else */ + add_menu(win, NO_GLYPH, &any, 'A', 0, ATR_NONE, buf, MENU_UNSELECTED); + } end_menu(win, prompt); n = select_menu(win, way ? PICK_ANY : PICK_ONE, &pick_list); destroy_nhwindow(win); if (n > 0) { + /* first check for 'all'; it means 'use a blank list' + rather than 'collect every possible choice' */ + for (i = 0; i < n; ++i) + if (pick_list[i].item.a_int == ' ') { + pick_list[0].item.a_int = ' '; + n = 1; /* return 1; also an implicit 'break;' */ + } for (i = 0; i < n; ++i) *class_select++ = (char) pick_list[i].item.a_int; free((genericptr_t) pick_list); From d8e430b90751218f57eeaed6f21c0ce02f238dea Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 13 Dec 2018 23:52:35 -0800 Subject: [PATCH 6/6] last? pickup_types Although choose_classes_menu() is only used for objects, it is written to handle monsters too. My change to give special handling might have broken selecting ghosts if it's ever used for monsters so fix that. --- src/options.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/options.c b/src/options.c index 4c4d3f4ad..ead3a707a 100644 --- a/src/options.c +++ b/src/options.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 options.c $NHDT-Date: 1544751219 2018/12/14 01:33:39 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.346 $ */ +/* NetHack 3.6 options.c $NHDT-Date: 1544773907 2018/12/14 07:51:47 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.347 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Michael Allison, 2008. */ /* NetHack may be freely redistributed. See license for details. */ @@ -6346,13 +6346,15 @@ char *class_select; n = select_menu(win, way ? PICK_ANY : PICK_ONE, &pick_list); destroy_nhwindow(win); if (n > 0) { - /* first check for 'all'; it means 'use a blank list' - rather than 'collect every possible choice' */ - for (i = 0; i < n; ++i) - if (pick_list[i].item.a_int == ' ') { - pick_list[0].item.a_int = ' '; - n = 1; /* return 1; also an implicit 'break;' */ - } + if (category == 1) { + /* for object classes, first check for 'all'; it means 'use + a blank list' rather than 'collect every possible choice' */ + for (i = 0; i < n; ++i) + if (pick_list[i].item.a_int == ' ') { + pick_list[0].item.a_int = ' '; + n = 1; /* return 1; also an implicit 'break;' */ + } + } for (i = 0; i < n; ++i) *class_select++ = (char) pick_list[i].item.a_int; free((genericptr_t) pick_list);