]> granicus.if.org Git - nethack/commitdiff
Add an option to give feedback when bumping walls
authorPasi Kallinen <paxed@alt.org>
Tue, 24 Mar 2015 20:01:29 +0000 (22:01 +0200)
committerPasi Kallinen <paxed@alt.org>
Tue, 24 Mar 2015 20:01:29 +0000 (22:01 +0200)
Boolean option "mention_walls", defaults to off.
Useful for blind players.

doc/Guidebook.mn
doc/fixes35.0
include/flag.h
src/hack.c
src/options.c

index 0b2e5cf3b814faa9c77eabce0ffb92bc5390b715..04cb9ea5f0101fdbe8722cace50cdcbd36276a8c 100644 (file)
@@ -2053,6 +2053,8 @@ Enable mail delivery during the game (default on).
 .lp "male    "
 An obsolete synonym for ``gender:male''.
 Cannot be set with the `O' command.
+.lp mention_walls
+Give feedback when walking against a wall (default off).
 .lp menustyle
 Controls the interface used when you need to choose various objects (in
 response to the Drop command, for instance).  The value specified should
index 5d9f4707af162f2141cccdda816db576620cb1e4..d1cd029327ff54298d29fb67a22d1b189a7a5d83 100644 (file)
@@ -879,7 +879,7 @@ abuse wisdom in keeping with Rider eating message
 message inconsistency: death message "swallowed <mon> whole" was preceded 
        by "You bite into"
 improve the messaging when a monster you can't see is causing an obstruction
-
+add option mention_walls, which gives feedback when bumping against a wall
 
 Platform- and/or Interface-Specific Fixes
 -----------------------------------------
index aaff7431cfa8d8763953f606ff9b2fe7b9c6ac11..add59340e79da33684f75b771d5dd5e283e20212 100644 (file)
@@ -189,6 +189,7 @@ struct instance_flags {
        boolean  deferred_X;    /* deferred entry into explore mode */
        boolean  num_pad;       /* use numbers for movement commands */
        boolean  news;          /* print news */
+       boolean  mention_walls; /* give feedback when bumping walls */
        boolean  menu_tab_sep;  /* Use tabs to separate option menu fields */
        boolean  menu_requested; /* Flag for overloaded use of 'm' prefix
                                  * on some non-move commands */
index 1edfb9f4e5d95f700a118df3ad08cee8f9bcac07..7f15af6eeaff611a7ed095e504cea7b4722592cd 100644 (file)
@@ -630,8 +630,11 @@ int mode;
        if (Passes_walls && may_passwall(x,y)) {
            ;   /* do nothing */
        } else if (tmpr->typ == IRONBARS) {
-           if (!(Passes_walls || passes_bars(youmonst.data)))
+           if (!(Passes_walls || passes_bars(youmonst.data))) {
+               if (iflags.mention_walls)
+                   You("cannot pass through the bars.");
                return FALSE;
+           }
        } else if (tunnels(youmonst.data) && !needspick(youmonst.data)) {
            /* Eat the rock. */
            if (mode == DO_MOVE && still_chewing(x,y)) return FALSE;
@@ -646,8 +649,10 @@ int mode;
                if (Is_stronghold(&u.uz) && is_db_wall(x,y))
                    pline_The("drawbridge is up!");
                /* sokoban restriction stays even after puzzle is solved */
-               if (Passes_walls && !may_passwall(x,y) && In_sokoban(&u.uz))
+               else if (Passes_walls && !may_passwall(x,y) && In_sokoban(&u.uz))
                    pline_The("Sokoban walls resist your ability.");
+               else if (iflags.mention_walls)
+                   pline("It's a wall.");
            }
            return FALSE;
        }
index 147e0a701cf21ebad179579efe09b0fe86a4752c..d1f5b26deb35ebaa6b29b14a3ec66323d12da6b7 100644 (file)
@@ -139,6 +139,7 @@ static struct Bool_Opt
 #else
        {"mail", (boolean *)0, TRUE, SET_IN_FILE},
 #endif
+       {"mention_walls", &iflags.mention_walls, FALSE, SET_IN_GAME},
        /* for menu debugging only*/
        {"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME},
        {"mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME},        /*WC*/