Adds two new configurable keys to the cursor targeting: 'A' (getpos.menu)
and 'a' (getpos.menu.cansee). First one shows a menu of all interesting
glyphs on the map, second one shows only those in sight.
Travel command also now obeys the "request menu" -prefix, showing
the menu with interesting targets in sight, and then traveling there.
Idea via the NetHack accessibility research by Alexei Pepers.
This is a modified version of Jason Dorje Short's key rebinding
patch, and allows also binding special keys, such as the ones
used in getloc and getpos.
One of the ways to play NetHack on nethack.alt.org is via a HTML
terminal in browser. Unfortunately this means several ctrl-key
combinations cannot be entered, because the browser intercepts
those. Similar thing applies to some international keyboard layouts
on Windows. With this patch, the user can just rebind the command
to a key that works best for them.
I've tested this on Linux TTY, X11, and Windows TTY and GUI.
The blank symbol set can be used with screen reader software
to prevent it from reading the map symbols.
Prevent a segfault when looking at the map and many symbols
share the same character. Don't list too many symbols when
looking at those, if many share the same character.
The visibility check in mattackm doesn't guarantee both the
attacker and defender can be seen by hero. Before giving
messages, check more strictly whether we could see the
message happening - either really seeing the monster or
sensing the monster by some other means, depending on
the message. This should remove most of the "It" messages.
Also unhide mimics who get gazed by umber hulks. We could
keep the mimic hidden and make the messages reflect the
hulk gazing at the thing the mimic is mimicing, but this
is much easier. This fixes bz631 / H4500
With menustyle set to "full" or "partial", using 'D' when not
carrying anything gave no feedback. (Modes "traditional" and
"combination" give "you have nothing to drop" via ggetobj().)
Also, there's no need to reset in-progress armor removal, lock
picking, or trap setting if you don't actually drop anything.
The inventory they're set to operate on or with stays intact.
Eating a corpse and being told that it "tastes okay" (relatively
recent change so that omnivores don't find the taste of everything
to be "terrible") doesn't warrant an exclamation point.
Yet another accessibility feature. When asked for a location
to travel, and autodescribe is on, the location description
has "(no travel path)" appended, if there is no known path
to that location.
The bug report assumed "you mime throwwing something" feedback
from 't-' was a typo, but 'throwwing' gets generated from 'throw'.
Change ing_suffix() not to double final 'w'. Presumeably 'w' and 'y'
are exceptions because they're sometimes used as vowels.
Change 'strrchr()' to 'rindex()' like the rest of nethack. Someday
those will need to be switched the other way around.
Add some missing bounds checking, although since ing_suffix() isn't
used for user-supplied strings, that's probably superfluous.
farlook was changed (end of December) to use doname instead of xname
to yield more info for items which had already been seen up close,
but it gave away info about ones which hadn't. So doname was changed
(end of April) to use "some" instead of precise quantity (when the
quantity is greater than 1) for the latter, but that doesn't work
well with corpse_xname() when the hero is blind, yielding "a some
<foo> corpses". While testing the first fix attempt, I noticed that
pickup gave "you can only lift some of the some <foo> corpses".
This fix is far from perfect. farlook can still say "some <item>s"
but lookhere and pickup always say "N <item>s". Picking up a stack
while blind will show "N <item>s" in inventory display, but dropping
it while still blind will revert to "some <item>s" for farlook.
Blessed genocide of "titans" wiped out all quadrupeds because
"titan" is a prefix of "titanothere". After class letters and
class descriptions have been rejected, Have name_to_monclass()
resort to name_to_mon() instead of doing its own less detailed
name matching.
drain_item() always assumed player was responsible, so called
costly_alteration() to adjust shop price of disenchanted item.
If it was unpaid and the effect was caused by a disenchanter
attack rather than by the hero, the feedback was nonsensical.
This also lets a disenchanter hit worn rings, amulet, or blindfold
if no armor gets targetted. Amulets, blindfolds, and most rings
have no charge to be drained, but several types of rings do.
The value calculated for total_tiles_used never got adjusted for
displaying statues-as-monsters. The most common configuration(s)
using tiles don't care, but the combination of X11 plus USE_XPM
needs an accurate value there.
Autopickup for pickup_types is disabled for unpaid shop goods, but
always-pick-up autopickup_exception still picked things up, as did
pickup_thrown for thrown objects. Now they'll only work in shops
for no_charge items (dropped by hero and shk didn't want, or hero
declined to sell).
costly_spot() was being recalculated for every item which passed
pickup_types. This changes autopickup to check it once for a given
autopickup operation and cache the result. [Whenever the hero moves,
a room entry check is performed. That ought to be extended to cache
costly_spot() for <u.ux,u.uy> in iflags or u.]
Reported directly to devteam, specifying the playmode option without
appending a value caused a segfault during options parsing. The
argument passed to string_for_opt() ought to have been False for
"not optional" to trigger a "bad syntax" message, but even then the
playmode parsing needs to check for Null to prevent the crash.
"Bad syntax" is awfully vague. In cases like this, we can be more
precise. Now it will say "Missing value" instead.
Noticed while testing something. Final disclosure of dungeon
overview showed "Level 1: <- You were here", which looked a bit odd
when the game ended by climbing the stairs to escape the dungeon.
Change the annotation when escaping to be "<- You left from here".
'Here' will usually be level 1, but not always.