This is more robust than the previous hack. The issue of whether to
use it in other places is still unexplored. Ultimately it's the user's
fault if overzealous message suppression hides something important.
[For an eerie game, try 'MSGTYPE=hide .'.]
User had
MSGTTYPE=norep "You see here"
and complained that once the message had been given while walking
over an object, using ':' to intentionally look at something would
end up doing nothing if its feedback was a repeat of "You see here".
Trying to classify which actions should deliberately override
no-repeat (or no-show) will be an ordeal. This fixes the case for
the ':' command where the user obviously expects feedback. I think
it could be done better but am settling for something quick and easy.
Rename the option for adding coordinates to autodescribe feedback for
the '/' and ';' commands from 'getpos_coord' to 'whatis_coord', after
the '/' command that uses it instead of after the internal routine
that implements it. The 'whatis' name was only in dat/hh as far as I
could find, so this changes it to 'what-is' and also updates dat/help
and the Guidebook to mention the name too.
Add a 'screen' choice to the option to show coordinates as row,column
rather than x,y or compass direction(s). Revise the /m, /M, /o, /O
operations of 'what-is' to honor the whatis_coord option (mostly; a
value of 'none' gets overridden by 'map' to force coordinates).
Also, update the description of the functionality of the '/' command
in the Guidebook. The .mn version is tested, the .tex one isn't.
Several people have asked if 3.6.0 supports playing with tiles on
a public server. Because there's no way for the user's end to know
what that white @ is, this adds special console escape codes for
tile hinting.
The idea was originally a patch called TelnetTiles by Justin Hiltscher,
but this expanded version comes via NAO, where it's been in use for years.
This is basically an interim hack, which should go away when/if
we support actual client-server model.
This was a request from a blind player. It's hard to find
the left edge of the menu when it's drawn on the map, so
clear the screen and align menus to the left edge of the screen
when this option is turned off.
Originally this was called the window edge patch.
The option defaults to on, which is the old-style behaviour.
Turning the option off will never omit the "uncursed" -status
from inventory lines. This is pretty much required if users
want to use menucolors based on the BUC state.
I did my best to exempt some of the bigger aligned blocks from the reformatting
using the /* clang-format off */ and /* clang-format on */ tags. Probably some
that shouldn't have been formatted were anyway; if you encounter them, please
fix.
The clang-format tags were left in on the basis that it's much easier to prune
those out later than to put them back in, and it means that, modulo my custom
version of clang-format, I should be able to run clang-format on the source tree
again without changing anything, now that Pat has fixed the VA_DECL issues.
Changes to be committed:
modified: include/config.h
modified: include/extern.h
modified: include/flag.h
modified: include/global.h
modified: include/ntconf.h
modified: include/wintty.h
modified: src/cmd.c
modified: src/files.c
modified: src/options.c
modified: sys/share/pcmain.c
modified: sys/share/pcsys.c
modified: sys/share/pcunix.c
modified: sys/winnt/Makefile.gcc
modified: sys/winnt/Makefile.msc
modified: sys/winnt/nttty.c
new file: sys/winnt/stubs.c
modified: sys/winnt/winnt.c
modified: util/makedefs.c
modified: win/tty/wintty.c
Adjust the code and the command line Makefile so that
you no longer have to choose whether to build the tty
version NetHack.exe, or the gui version NetHackW.exe.
Both will now be built in a single 'nmake install' pass.
Adds the "sortloot" compound option, with possible values
of "none", "loot", or "full". It controls the sorting of
item pickup lists for inventory and looting.
-Add a boolean option menucolors to toggle menu color
-Add MENUCOLOR -config file option
TODO:
-Better support for win32
-Support more windowports
-Update Guidebook
-Allow changing menucolor lines in-game
This is Michael Deutschmann's use_darkgray -patch.
Adds a boolean option use_darkgray, settable in config file.
This patch has been in use on NAO for years, and I have heard
once someone say their terminal didn't support the dark gray
color.
This reverts commit 7f0f43e6f9 and some related
subsequent commits.
This compiles, but I have not done extensive testing.
Conflicts:
include/config.h
include/decl.h
include/extern.h
include/global.h
include/tradstdc.h
include/wintty.h
src/drawing.c
src/files.c
src/hacklib.c
src/mapglyph.c
src/options.c
sys/winnt/nttty.c
win/tty/getline.c
win/tty/topl.c
win/tty/wintty.c
Add 'o' to "i a v g c" disclosure set, to display final dungeon
overview at end of game. It lists all levels visited rather than just
those that #overview considers to be interesting, but it doesn't reveal
any undiscovered aspects of those levels except for the presence of bones.
(I think revealing shops and altars and such would be worthwhile, but the
data for that isn't handy at the time.) If the game ends due to death,
the bones section of the current level will have "you, <reason you died>"
(before any real bones entries for that level). That occurs before bones
file creation so it doesn't give away whether bones are being saved.
end.c includes some unrelated lint cleanup.
Guidebook.{mn,tex} updates the section for autopickup_exceptions as
well as for disclose. It had some odd looking indentation due to various
explicit paragraph breaks. I took "experimental" out of its description
since it was moved out of the experimental section of config.h long ago.
The revised Guidebook.tex is untested.
branch only. This adds a check when setting a new fruit so that if no fruits
have been created since the last time the option has been set, the current
fruit is overwritten. Result: the user cannot repeatedly set the fruit
option and overflow the maximum fruit number.
Redo the fix that prevents hangup from putting hero on top of water
if it occurs during magic mapping or object/gold/trap detection. Instead
of copying u.uinwater into another field in struct u so that it can be
reset during restore, copy it into a new field in struct iflags and reset
it during save so that no fixup upon restore is needed.
Using the two Windows binaries, starting a game with the tty
interface (nethack.exe) and saving, then restoring and finishing with
the win32 interface (nethackW.exe) would display the topten output as a
series of popup windows displaying one line at a time. The win32 binary
forces the toptenwin option to 1, but when restoring a saved game that
would get overridden by data from the save file and could end up 0.
This change keeps the toptenwin option out of save files, like color
and other display-oriented features that might not be applicable when
restoring on something with different capabilities. Separate binaries
for alternate interfaces aren't quite the same situation, but close enough.
The toptenwin option can still be toggled interactively with 'O', but the
new value will disappear if you save rather than finish. Setting it once
via config file or environment variable is the preferred way to go if you
want to override the default behavior.
Both trunk and branch get iflags.toptenwin added. For the trunk,
flags.toptenwin is simply deleted and patchlevel.h's EDITLEVEL is bumped.
For the branch, flags.toptenwin is renamed and becomes unused, while
EDITLEVEL is left alone. Leaving a dummy field in the old toptenwin slot
of struct flags preserves save file compatability with 3.4.3.
A couple of extensions to the paranoid_confirmation option:
1) add paranoid_confirmation:Confirm -- setting this means that any
prompt where the other paranoid_confirm flags have been set to require
a yes response instead of y to confirm also require explicit no rather
than arbitrary non-yes to reject. It will reprompt if you don't answer
"yes" or "no" (unless you use ESC, which is treated the same as "no").
2) add paranoid_confirmation:bones -- control whether the "save bones?"
prompt in wizard mode requires yes instead of just y. The original user-
developed paranoid_confirm patch required yes unconditionally here, and
I left that out thinking it was undesireable. But after testing the
"your body rises from the dead as <undead>..." fix a couple of days ago,
where you now get an extra message and consequent --More-- prompt just
before "save bones?", I've changed my mind about its usefulness, provided
that it's settable rather than unconditional.
Handling paranoid_confirmation:bones outside of wizard mode is a
bit tricky. Right now, it can still be seen via 'O' if it has been set
in NETHACKOPTIONS, but it won't show up in the menu if you use 'O' to
interactively change the value of paranoid_confirmation. I'm not sure
whether that's the right way to go; it might be better to let non-wizard
users uselessly toggle it on and off rather than only partially hide it.
Or maybe it should be hidden from the current value even when it's set.
Or decline to set it in first place, despite external option settings.
Some time ago we received a patch submission which attempted to
handle the Alt key for terminals or emulators which transmit two char
sequence "ESC c" when Alt+c is pressed, but I can't find it. I don't
remember the details but recall that it had at least once significant
problem (perhaps just that it was unconditional, although it may have
been implemented in a way which interferred with using ESC to cancel).
This patch reimplements the desired fix, making the new behavior be
conditional on a boolean option: altmeta. That option already exists
for the Amiga port, where it deals with low-level keyboard handling but
essentially affects the same thing: whether Alt+key can be used as a
shortcut for various extended commands. This one affects how the core
processes commands, and is only available if ALTMETA is defined at
compile time. I've defined that for Unix and VMS; other ports don't
seem to need it. (I'm not sure whether "options" created by makedefs
ought to mention it. So far, it doesn't since this isn't something
users are expected to tweak. The setting of the non-Amiga altmeta
option doesn't get saved and restored, so won't affect saved data if
someone does toggle ALTMETA and then rebuild.)
When [non-Amiga] altmeta is set, nethack's core will give special
handling to ESC, but only during top level command processing. If ESC
is seen while reading a command, it will be consumed and then the next
character seen will have its meta bit set. This introduces a potential
problem: typing ESC as a command will result in waiting for another
character instead of reporting that that isn't a valid command. Since it
isn't a valid command, this shouldn't be a big deal, but starting a count
intended to prefix your next command and then typing ESC after deciding
to abort that count runs into the same situation: nethack will wait for
another character to complete the two character sequence expected for
"ESC c". There's not much that can be done with this, other than have
the Guidebook mention that an extra ESC is needed to cancel the pending
count, because digits followed by ESC could actually be a numeric prefix
for Alt+something rather than an attempt to abort the count.
[Long writeup committed with flag.h and options.c only.]
This is a reworking of a user contributed patch available in Pasi
Kallinen's NetHack Patch Database at http://bilious.homelinux.org under
the name "Paranoid_Quit". It was created by David Damerell and extended
by several others, and I haven't attempted to preserve attribution.
Their patch added three new boolean run-time options (this one
doesn't; details below):
paranoid_quit: if true, change the "really quit?" prompt to require an
answer of yes rather than just y to quit, presumeably for players who
type faster than they read and think (been there, done that...). It
also applies to the "do you want to enter explore mode?" prompt. The
changed prompt shows yes and no rather than yn as possible answers.
After having used it a few times, I find it easily noticeable that
"yes"<return> is expected instead of just single keystroke 'y', and
if you mess up somehow you can just reissue the #quit or X command
with no harm done. (And the default setting is off; the game still
issues the original yn prompt.)
paranoid_hit: if true, make a similar change for the "really attack <the
peaceful monster>?" prompt. Definitely helpful if you bump into a
monster while in the midst of using 'y' to move diagonally upper left.
Note that this just changes the expected/required answer to an existing
prompt; it doesn't change interaction between the hero and monsters.
paranoid_remove: if true, the 'R' and 'T' commands will prompt the player
to select an appropriate item from inventory even when there's only one
applicable item (instead of simply removing or taking off that only
item). Helpful if you think you've got more than one thing on and
intend to take off something other than the last one (which might be a
ring of levitation keeping you from dropping into lava or a blindfold
and you're trying to play the whole game blinded).
Their patch also made two other changes which weren't controllable via
options: when dipping, after picking what to dip, mention it in the
second prompt for what to dip into; and require yes instead of y at the
wizard mode "save bones?" prompt. We've had the enhanced dipping prompt
for a while, and "unknown" installed a fix-up (which wasn't needed with
their version) for it recently. I've left our bones prompt alone, the
original yn query. Anyone who saves bones by accident can remove them,
if not externally they by using wizard mode to revisit the same dungeon
depth, load the bones, and unlink them.
#####
That's a summary of the contributed patch. Now for the implemented
one.... Instead of separate booleans, this adds a single compound option
called "paranoid_confirmation" that takes a string argument of space
separated words: "quit die attack pray Remove". And it puts the actual
yes vs y querying into a new routine instead of duplicating it at each
affected prompting location.
paranoid_confirm:quit - as above, if true then require yes instead of y
to answer the "really quit?" and "do you want to enter explore mode?"
prompts. Can also be supplied as paranoid_confirm:explore or even
"quit explore" but that's just redundant; it's a single flag which
controls prompting for both game-ending or game-altering commands.
paranoid_confirm:die - applicable only for explore and wizard modes but
visible/settable during option viewing/changing in normal play. If
true then require yes instead of y at the "die?" prompt. This wasn't
part of their original patch, but should have been since the effect
of accidental y is just as drastic as unintentionally quitting.
paranoid_confirm:attack - as above, yes vs y for "really attack <the
peaceful monster?". Can also be supplied as paranoid_confirm:hit.
paranoid_confirm:pray - supersedes the existing prayconfirm boolean.
That option is still accepted and honored duing config file processing,
but option viewing/changing with 'O' only handles the new variant.
This does not control "yes" vs 'y', but rather whether there's a prompt
first or prayer simply starts. When used, the prompt itself is the
same yn one already being asked with prayconfirm. Presumably config
file support for prayconfirm will go away in some future version.
Unlike the other paranoid settings, this one defaults to 'on' in order
to match the 3.3.0 through 3.4.3 behavior controlled by prayconfirm,
whose default was on (but maybe should have been off...).
paranoid_confirm:Remove - as above, causes the 'R' and 'T' commands to
use a "what do you want to remove?" or "what do you want to takeoff?"
inventory selection prompt even when only one accessory or piece of
armor is worn. Player can pick the inventory letter and remove/takeoff
the item, use ? or * to see what the candidate item is, or cancel with
ESC. Can be supplied as paranoid_confirm:takeoff or "remove takeoff",
but like with "quit explore", a single flag controls the behavior of
both 'R' and 'T'.
Option file processing accepts two other settings, paranoid_confirm:none
and paranoid_confirm:all, but those are not available (nor needed) when
using the 'O' command. "none" is useful because it's the value shown to
the player by 'O' when none of the paranoia flags are set, and it's a
way to turn off paranoid_confirm:pray without turning on any of the other
choices. "all" probably isn't very useful but was trivial to tack on.
This is an example of the menu that 'O' puts up after picking option
paranoid_confirmation from the main list. I've shifted everything left
to reduce whitespace here; it appears on the right side of the screen for
tty menuing.
Actions requiring extra confirmation:
q - yes vs y to quit or to enter explore mode
d - yes vs y to die (explore mode or debug mode)
a - yes vs y to attack a peaceful monster
p + y to pray (supersedes old "prayconfirm" option)
R - always pick from inventory for Remove and Takeoff
(end)
Currently set paranoia features are marked as preselected and can be
toggled off along with toggling any others on as desired. I've just
realized that this menu relies on showing entries marked via preselection
rather than explicitly annotating each one as [on] or [off]; that seemed
perfectly natural during testing so I think I'll leave it this way, at
least for the time being.
[See cvs log for src/role.c for a much longer description.]
When picking role, race, and so forth, new menu entries allow you to
pick any of the other items before the one currently being handled. After
picking all four of race, role, gender, and alignment (or if you answered
'y' to "shall I pick for you?"), there is a followup prompt to confirm the
choices. It's a menu which also provides a chance to rename the character.
This has only been implemented in win/tty's player_selection(), with
some support code in the core that might be useful to other interfaces.
And so far, the chance to rename is only presented as a menu choice if
you've given an answer to "who are you?" prompt earlier during startup.
Also, ports that use pcmain.c aren't able to perform hero renaming yet.