Add an option to give feedback when bumping walls

Boolean option "mention_walls", defaults to off.
Useful for blind players.
This commit is contained in:
Pasi Kallinen
2015-03-24 22:01:29 +02:00
parent dfe967732d
commit d787f45dcb
5 changed files with 12 additions and 3 deletions
+2
View File
@@ -2053,6 +2053,8 @@ Enable mail delivery during the game (default on).
.lp "male " .lp "male "
An obsolete synonym for ``gender:male''. An obsolete synonym for ``gender:male''.
Cannot be set with the `O' command. Cannot be set with the `O' command.
.lp mention_walls
Give feedback when walking against a wall (default off).
.lp menustyle .lp menustyle
Controls the interface used when you need to choose various objects (in Controls the interface used when you need to choose various objects (in
response to the Drop command, for instance). The value specified should response to the Drop command, for instance). The value specified should
+1 -1
View File
@@ -879,7 +879,7 @@ abuse wisdom in keeping with Rider eating message
message inconsistency: death message "swallowed <mon> whole" was preceded message inconsistency: death message "swallowed <mon> whole" was preceded
by "You bite into" by "You bite into"
improve the messaging when a monster you can't see is causing an obstruction 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 Platform- and/or Interface-Specific Fixes
----------------------------------------- -----------------------------------------
+1
View File
@@ -189,6 +189,7 @@ struct instance_flags {
boolean deferred_X; /* deferred entry into explore mode */ boolean deferred_X; /* deferred entry into explore mode */
boolean num_pad; /* use numbers for movement commands */ boolean num_pad; /* use numbers for movement commands */
boolean news; /* print news */ 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_tab_sep; /* Use tabs to separate option menu fields */
boolean menu_requested; /* Flag for overloaded use of 'm' prefix boolean menu_requested; /* Flag for overloaded use of 'm' prefix
* on some non-move commands */ * on some non-move commands */
+7 -2
View File
@@ -630,8 +630,11 @@ int mode;
if (Passes_walls && may_passwall(x,y)) { if (Passes_walls && may_passwall(x,y)) {
; /* do nothing */ ; /* do nothing */
} else if (tmpr->typ == IRONBARS) { } 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; return FALSE;
}
} else if (tunnels(youmonst.data) && !needspick(youmonst.data)) { } else if (tunnels(youmonst.data) && !needspick(youmonst.data)) {
/* Eat the rock. */ /* Eat the rock. */
if (mode == DO_MOVE && still_chewing(x,y)) return FALSE; 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)) if (Is_stronghold(&u.uz) && is_db_wall(x,y))
pline_The("drawbridge is up!"); pline_The("drawbridge is up!");
/* sokoban restriction stays even after puzzle is solved */ /* 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."); pline_The("Sokoban walls resist your ability.");
else if (iflags.mention_walls)
pline("It's a wall.");
} }
return FALSE; return FALSE;
} }
+1
View File
@@ -139,6 +139,7 @@ static struct Bool_Opt
#else #else
{"mail", (boolean *)0, TRUE, SET_IN_FILE}, {"mail", (boolean *)0, TRUE, SET_IN_FILE},
#endif #endif
{"mention_walls", &iflags.mention_walls, FALSE, SET_IN_GAME},
/* for menu debugging only*/ /* for menu debugging only*/
{"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME}, {"menu_tab_sep", &iflags.menu_tab_sep, FALSE, SET_IN_GAME},
{"mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME}, /*WC*/ {"mouse_support", &iflags.wc_mouse_support, TRUE, DISP_IN_GAME}, /*WC*/