diff -bruNX ignore.txt ..\official/changes ./changes --- ..\official/changes Thu Jan 1 00:00:00 1970 +++ ./changes Wed Aug 24 14:17:58 2005 @@ -0,0 +1,11 @@ +Changes to the section 9.4. Customization options in NetHack Guidebook + + +Add the following: + +--- +confirm_untrap + Have the game confirm if you want to search for traps on a lone container + on floor where no floor trap exist. (default on). +--- + diff -bruNX ignore.txt ..\official/include/config.h ./include/config.h --- ..\official/include/config.h Mon Dec 8 01:39:14 2003 +++ ./include/config.h Wed Aug 24 13:47:10 2005 @@ -351,6 +351,8 @@ /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ /*#define AUTOPICKUP_EXCEPTIONS */ /* exceptions to autopickup */ +#define CONFIRM_UNTRAP /* Confirms checking of traps from a lone container */ + /* End of Section 5 */ #include "global.h" /* Define everything else according to choices above */ diff -bruNX ignore.txt ..\official/include/flag.h ./include/flag.h --- ..\official/include/flag.h Mon Dec 8 01:39:14 2003 +++ ./include/flag.h Wed Aug 24 13:48:38 2005 @@ -175,6 +175,9 @@ uchar bouldersym; /* symbol for boulder display */ boolean travel1; /* first travel step */ coord travelcc; /* coordinates for travel_cache */ +#ifdef CONFIRM_UNTRAP + boolean confirm_untrap; /* Confirm of checking of traps for a lone container */ +#endif #ifdef WIZARD boolean sanity_check; /* run sanity checks */ boolean mon_polycontrol; /* debug: control monster polymorphs */ diff -bruNX ignore.txt ..\official/src/options.c ./src/options.c --- ..\official/src/options.c Mon Dec 8 01:39:14 2003 +++ ./src/options.c Wed Aug 24 14:11:26 2005 @@ -75,6 +75,9 @@ {"color", &iflags.wc_color, FALSE, SET_IN_GAME}, /*WC*/ # endif {"confirm",&flags.confirm, TRUE, SET_IN_GAME}, +#ifdef CONFIRM_UNTRAP + {"confirm_untrap", &iflags.confirm_untrap, TRUE, SET_IN_GAME}, +#endif #if defined(TERMLIB) && !defined(MAC_GRAPHICS_ENV) {"DECgraphics", &iflags.DECgraphics, FALSE, SET_IN_GAME}, #else diff -bruNX ignore.txt ..\official/src/trap.c ./src/trap.c --- ..\official/src/trap.c Mon Dec 8 01:39:14 2003 +++ ./src/trap.c Wed Aug 24 14:08:14 2005 @@ -3405,6 +3405,9 @@ boolean trap_skipped = FALSE; boolean box_here = FALSE; boolean deal_with_floor_trap = FALSE; +#ifdef CONFIRM_UNTRAP + boolean floor_trap = FALSE; +#endif char the_trap[BUFSZ], qbuf[QBUFSZ]; int containercnt = 0; @@ -3422,6 +3425,9 @@ if ((ttmp = t_at(x,y)) && ttmp->tseen) { deal_with_floor_trap = TRUE; +#ifdef CONFIRM_UNTRAP + floor_trap = TRUE; +#endif Strcpy(the_trap, the(defsyms[trap_to_defsym(ttmp->ttyp)].explanation)); if (box_here) { if (ttmp->ttyp == PIT || ttmp->ttyp == SPIKED_PIT) { @@ -3483,6 +3489,9 @@ if(!u.dx && !u.dy) { for(otmp = level.objects[x][y]; otmp; otmp = otmp->nexthere) if(Is_box(otmp)) { +#ifdef CONFIRM_UNTRAP + if (containercnt > 1 || floor_trap || iflags.confirm_untrap) { +#endif Sprintf(qbuf, "There is %s here. Check it for traps?", safe_qbuf("", sizeof("There is here. Check it for traps?"), doname(otmp), an(simple_typename(otmp->otyp)), "a box")); @@ -3490,6 +3499,9 @@ case 'q': return(0); case 'n': continue; } +#ifdef CONFIRM_UNTRAP + } +#endif #ifdef STEED if (u.usteed && P_SKILL(P_RIDING) < P_BASIC) { You("aren't skilled enough to reach from %s.",