diff -bruNX ignore.txt ..\official/changes ./changes --- ..\official/changes Thu Jan 1 00:00:00 1970 +++ ./changes Tue Aug 23 13:34:42 2005 @@ -0,0 +1,32 @@ +Changes to the section 4 Commands in NetHack Guidebook + +Change the command X to read as follows: + +--- +X Toggle two-weapon combat on or off. Note that you must use + suitable weapons for this type of combat, or it will be au- + tomatically turned off. +--- + +Add the following: + +--- +#explore + Enter explore (discovery) mode, explained in its own section + later. + +M-x #explore +--- + + +Changes to the section 9.4. Customization options in NetHack Guidebook + + +Add the following: + +--- +confirm_locking + Have the game confirm if a door or a lonely container is (un)locked + (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 Mon Aug 22 17:48:44 2005 @@ -351,6 +351,17 @@ /*#define GOLDOBJ */ /* Gold is kept on obj chains - Helge Hafting */ /*#define AUTOPICKUP_EXCEPTIONS */ /* exceptions to autopickup */ +#define CONFIRM_LOCKING /* Confirmation messages for (un)locking doors or + * containers if only one container in the location + * if confirm_locking is set in the options. + * Default is on. + * Can be set during the game. + */ + +#define X_TWOWEAPON /* X command is changed to twoweapon; meta-x and + * #explore is for entering the explore-mode. + */ + /* 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 Mon Aug 22 17:49:42 2005 @@ -175,6 +175,9 @@ uchar bouldersym; /* symbol for boulder display */ boolean travel1; /* first travel step */ coord travelcc; /* coordinates for travel_cache */ +#ifdef CONFIRM_LOCKING + boolean confirm_locking; /* ynq question for (un)locking */ +#endif #ifdef WIZARD boolean sanity_check; /* run sanity checks */ boolean mon_polycontrol; /* debug: control monster polymorphs */ diff -bruNX ignore.txt ..\official/src/cmd.c ./src/cmd.c --- ..\official/src/cmd.c Mon Dec 8 01:39:14 2003 +++ ./src/cmd.c Mon Aug 22 17:39:42 2005 @@ -1439,7 +1439,12 @@ {'W', FALSE, dowear}, {M('w'), FALSE, dowipe}, {'x', FALSE, doswapweapon}, +#ifdef X_TWOWEAPON + {'X', FALSE, dotwoweapon}, + {M('x'), TRUE, enter_explore_mode}, +#else {'X', TRUE, enter_explore_mode}, +#endif /* 'y', 'Y' : go nw */ {'z', FALSE, dozap}, {'Z', TRUE, docast}, @@ -1481,6 +1486,9 @@ {"dip", "dip an object into something", dodip, FALSE}, {"enhance", "advance or check weapons skills", enhance_weapon_skill, TRUE}, +#ifdef X_TWOWEAPON + {"explore", "enter the explore mode", enter_explore_mode, TRUE}, +#endif {"force", "force a lock", doforce, FALSE}, {"invoke", "invoke an object's powers", doinvoke, TRUE}, {"jump", "jump to a location", dojump, FALSE}, diff -bruNX ignore.txt ..\official/src/lock.c ./src/lock.c --- ..\official/src/lock.c Mon Dec 8 01:39:14 2003 +++ ./src/lock.c Mon Aug 22 17:54:30 2005 @@ -294,13 +294,29 @@ count = 0; c = 'n'; /* in case there are no boxes here */ + +#ifdef CONFIRM_LOCKING + for(otmp = level.objects[cc.x][cc.y]; otmp; otmp = otmp->nexthere) + if (Is_box(otmp)) ++count; + if ((count == 1) && !iflags.confirm_locking) c = 'y'; +#endif + for(otmp = level.objects[cc.x][cc.y]; otmp; otmp = otmp->nexthere) if (Is_box(otmp)) { + +#ifndef CONFIRM_LOCKING ++count; +#endif + if (!can_reach_floor()) { You_cant("reach %s from up here.", the(xname(otmp))); return 0; } + +#ifdef CONFIRM_LOCKING + if ((count > 1) || iflags.confirm_locking) { +#endif + it = 0; if (otmp->obroken) verb = "fix"; else if (!otmp->olocked) verb = "lock", it = 1; @@ -315,6 +331,10 @@ if(c == 'q') return(0); if(c == 'n') continue; +#ifdef CONFIRM_LOCKING + } +#endif + if (otmp->obroken) { You_cant("fix its broken lock with %s.", doname(pick)); return 0; @@ -401,11 +421,19 @@ } #endif +#ifdef CONFIRM_LOCKING + if (iflags.confirm_locking) { +#endif + Sprintf(qbuf,"%sock it?", (door->doormask & D_LOCKED) ? "Unl" : "L" ); c = yn(qbuf); if(c == 'n') return(0); + +#ifdef CONFIRM_LOCKING + } +#endif switch(picktyp) { #ifdef TOURIST 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 Tue Aug 23 13:36:48 2005 @@ -75,6 +75,9 @@ {"color", &iflags.wc_color, FALSE, SET_IN_GAME}, /*WC*/ # endif {"confirm",&flags.confirm, TRUE, SET_IN_GAME}, +#ifdef CONFIRM_LOCKING + {"confirm_locking", &iflags.confirm_locking, TRUE, SET_IN_GAME}, +#endif #if defined(TERMLIB) && !defined(MAC_GRAPHICS_ENV) {"DECgraphics", &iflags.DECgraphics, FALSE, SET_IN_GAME}, #else