PatR [Mon, 18 Nov 2019 00:45:10 +0000 (16:45 -0800)]
'--showpaths' dlb vs non-dlbb
Have the --showpaths feedback mention whether dlb is in use or not,
and show the container file name(s) when it is. Users of prebuilt
binaries or who build with a hints file instead of picking and
choosing things in config.h might not know, and vms (if it ever
catches up with --showpaths) uses a different container name from
everybody else ("nh-data.dlb" instead of "nhdat").
nhmall [Mon, 18 Nov 2019 00:13:23 +0000 (19:13 -0500)]
add some guard code to the Is_*_level macros in dungeon.h
All Is_*_level tests during early startup would test as true until
dungeon_topology was initialized in a new game or restored from
a save file. That could result in some unexpected code paths being
taken.
PatR [Sun, 17 Nov 2019 17:25:26 +0000 (09:25 -0800)]
pager warning fix and formatting
The mapglyph() change made a variable obsolete but it got left in
(idx = SYM_PET_OVERRIDE...). Take it out and fix up the formatting
for the block of code that had it.
PatR [Sun, 17 Nov 2019 02:31:30 +0000 (18:31 -0800)]
gas cloud fix
remove_region() calls newsym() when removing gas clouds, but when
newsym() checked whether it was updating a gas cloud location it
always got a false 'yes' because the region hadn't been removed yet.
Fixing this didn't seem to make any observable difference so it must
be followed fairly rapidly by a full vision recalc.
PatR [Sat, 16 Nov 2019 20:05:05 +0000 (12:05 -0800)]
partial fix for #H9430 - gas clouds vs monsters
Don't show the gas cloud glyph at locations where monsters can be
sensed (telepathy, warning, extended detection). It will work
better when/if vision of gas cloud locations gets fixed. (Such
clouds behave as the hero can see into them, so warning doesn't
have any unseen monsters to show unless they're unseen for some
reason other than the gas cloud.)
PatR [Sat, 16 Nov 2019 19:46:50 +0000 (11:46 -0800)]
monsters entering regions
Region processing does a lot of looping--when there are actually
regions present--and calls functions in those loops which do more
looping of their own. This moves some of the simpler tests so that
they get done sooner and can avoid some of those function calls.
I was hoping that it would speed up the turn cycle on the Plane of
Fire where the spontaneous irregularly shaped fumaroles are composed
of a lot of small regions but I don't think there's any noticeable
difference.
In process of doing that, I discovered a bug (no doubt copy+paste
which escaped an intended update) with monster handling. The check
for whether a monster is entering a region depends upon whether the
hero is in that same region rather than whether the monster is
already inside. So a monster can enter a region--or have a moving
one enclose it--with impunity if the hero is already in that region.
Once the hero moves out of it, the monster will finally enter it.
PatR [Sat, 16 Nov 2019 18:03:57 +0000 (10:03 -0800)]
curses lint
'orient' is the name of an enum defined in wincurs.h so don't use it
as a variable name in cursstat.c. My compiler didn't complain using
'-Wshadow' but apparently some other one does.
Make the same change in the dead code located in the second half of
that file, plus a couple of formatting tweaks.
PatR [Sat, 16 Nov 2019 03:03:11 +0000 (19:03 -0800)]
fix curses compile warning
From hardfought; latest gcc complains that /* fall through other stuff */
doesn't match its pattern for /* fall through */ comment indicating
that omitted 'break' statement is intentional and one switch case is
deliberately continuing into the code for another.
PatR [Sat, 16 Nov 2019 01:51:20 +0000 (17:51 -0800)]
have --showpaths show DUMPLOG file
While not a path exactly, the dumplog file isn't placed somewhere
fixed so being able to see where it is placed could be useful.
This cascaded a bit during testing. Fix one of the warnings from
hardfought (fqn_prefix_names[]). And a few more that came up with
SYSCF disabled (panictrace_gdb, two unused variables if files.c).
PatR [Fri, 15 Nov 2019 18:12:45 +0000 (10:12 -0800)]
hints/macosx10.14 comment
A comment in macosx10.14 describing how to create a signed package
had the last sample command wrong. Fix it now in case that part
carries over to hypothetical--but likely--new macosx10.15 hints.
Also, shorten a couple of wide comment lines in the same area.
PatR [Fri, 15 Nov 2019 00:42:53 +0000 (16:42 -0800)]
more #H9392 - deafness vs music
The report mentioned whistles but I had forgotten all about them by
the time I tried to deal with musical instruments. Plain whistles
had deaf handling but magic whistles didn't.
PatR [Wed, 13 Nov 2019 23:47:46 +0000 (15:47 -0800)]
fix #H1554, #H1736, github issue #240 - silver )
Fixes #240
Monster versus monster (melee and throwing) didn't handle shades
(need silver or blessed weapon to take damage) or silver feedback
(extra info when silver-haters are hit).
I did a lot of test, revise, re-test but didn't always re-test
everything that had previously been tested, so bugs that I thought
were quashed might have crept in.
Now if a missile weapon "passes harmlessly through the shade" it
will continue on and maybe hit something else. (Regular misses
still stop at the missed target.)
A couple of minor ball&chain changes accidentally got included.
PatR [Mon, 11 Nov 2019 20:55:50 +0000 (12:55 -0800)]
width of curses menus
Menus with wide header or separator lines were rendered wide enough
to avoid wrapping those lines, but ones with narrow header/separators
and wide selectable entries were limited to half the display even
though lots of lines that would fit with full width were being wrapped.
Change the latter behavior.
Menus are right justified with the edge of the map when narrower than
it, left justified otherwise, and if the display is wider than the map,
they'll extend beyond its right edge. (That hasn't actually changed;
it's just that left-justification is more likely now that menus will
be wide enough to show wide inventory lines without wrapping.)
Get rid of my ridiculous hack to force wider menu for the 'symset'
and 'roguesymset' sub-menus of 'O' since it's no longer useful.
There's still room for improvement. If any lines need to be wrapped
despite using the full width, or perhaps are just a lot wider than
most of the entries, menu width could be narrowed to just enough for
'normal' lines to fit so that one or two really long entries don't
distort the menu. That's a bit more complicated than I want to deal
with right now. [If implemented, it would be relevant for tty too.]
PatR [Sun, 10 Nov 2019 04:01:53 +0000 (20:01 -0800)]
--showpaths
Fix a couple of warnings about unused variables but mainly handle
OSX's multiple-choice for configuration file name. I tried moving
my ~/.nethackrc to '~/Library/Prefences/NetHack Defaults.txt' and
both regular play and --showpaths are finding it successfully.
Also an untested fix for VMS. "nethackini" is not supposed to have
any path information attached.
PatR [Sun, 10 Nov 2019 00:36:41 +0000 (16:36 -0800)]
more slippery gloves
Move makeplural(body_part(FINGER)) into its own routine, with option
to substitute gloves when wearing such.
Wearing slippery gloves (ie, wearing gloves while having slippery
fingers) wouldn't let you put on a ring because you can't take the
gloves off, but removing a worn ring lacked the same restriction.
After changing that, teach prayer that slippery gloves is another
reason why a ring of levitation can't be removed.
nhmall [Sat, 9 Nov 2019 15:57:25 +0000 (10:57 -0500)]
add command line option --showpaths
Add
--showpaths
early option to show where NetHack is expecting to find certain files
without starting up a game. It exits afterwards.
Windows sample (for illustration only, locations may differ for you):
Variable playground locations:
[hackdir ]="C:\Users\JohnDoe\NetHack\3.6\"
[leveldir ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\"
[savedir ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\"
[bonesdir ]="C:\ProgramData\NetHack\3.6\"
[datadir ]="C:\personal\nhdev\363\test\binary\"
[scoredir ]="C:\ProgramData\NetHack\3.6\"
[lockdir ]="C:\ProgramData\NetHack\3.6\"
[sysconfdir]="C:\ProgramData\NetHack\3.6\"
[configdir ]="C:\Users\JohnDoe\NetHack\3.6\"
[troubledir]="C:\Users\JohnDoe\NetHack\3.6\"
Your system configuration file (in sysconfdir):
"C:\Users\JohnDoe\NetHack\3.6\sysconf"
Your system symbols file (in sysconfdir):
"C:\Users\JohnDoe\NetHack\3.6\symbols"
Your personal configuration file (in configdir):
"C:\Users\JohnDoe\NetHack\3.6\.nethackrc"
Linux (for illustration only, locations may differ for you):
Your system configuration file:
"/home/johndoe/nh/install/games/lib/nethackdir/sysconf"
Your system symbols file:
"/home/johndoe/nh/install/games/lib/nethackdir/symbols"
Your personal configuration file:
"/home/johndoe/.nethackrc"
PatR [Sat, 9 Nov 2019 09:07:09 +0000 (01:07 -0800)]
fix #H9391 - slippery gloves
Slippery fingers would transfer from bare hands to gloved hands if
you put gloves on. The reverse, transfering from gloves to bare
hands when taking gloves off, was already being prevented for
directly taking them off, but still allowed the slipperiness to
transfer when gloves were lost. This prevents putting on gloves
when fingers are slippery and attempts to handle cases where gloves
get unworn by ways other than 'T' (or 'R') or 'A'.
There's no slippery attribute for objects (way too much work for too
little value); slippery gloves is just the combination of wearing
gloves and having slippery fingers (which now has to have happened
while already wearing those gloves). This changes inventory to use
"(being worn; slippery)" when applicable and much of the patch deals
with funnelling Glib changes through new make_glib() to try to make
sure that persistent inventory adds or removes "; slippery" right
away when changes happen.
If gloves are taken off involuntarily (shapechange to a form that
can't wear them, destruction via scroll of destroy armor or monster
spell of same or via overenchantment, theft), slippery fingers ends
right away instead of the usual few turns later.
PatR [Fri, 8 Nov 2019 01:54:57 +0000 (17:54 -0800)]
status highlight fix for experience level
When I expanded the Guidebook's sample configuration file I added
several status_hilite options. I decided that I'd better test what
was written and discovered that if Xp had an up or changed rule as
well as one or more percentage rules, it was showing bogus changes
whenever the integer value of the percentage changed. The fix
turned out to be simple but it took a while to figure out.
I ultimately left the status_hilite settings out of the sample
options, because they tended to be too wide for Guidebook.txt's
formatting rather than because they weren't working as expected.
PatR [Fri, 8 Nov 2019 00:10:55 +0000 (16:10 -0800)]
more Guidebook tweaks
Expand the sample configuration file a little and prevent it from
going past the right margin in Guidebook.txt.
Replace all instances of "config file" with "configuration file".
Reformat the "notes" at the end of the table of map symbols.
Unfortunately Guidebook.pdf from Guidebook.ps from Guidebook.mn
puts a page break between the header line "notes" and the two
actual notes.
Value 1 for 'mouse_support' was not just exceeding the margin of
Guidebook.txt but wrapping to the next line. Shorten it.
Guidebook.tex had a typo "in the foler" (where 'folder' was meant)
and Guidebook.mn didn't have that phrase at all.
PatR [Thu, 7 Nov 2019 09:42:29 +0000 (01:42 -0800)]
fixes36.3 again
Noticed that "multiple" was misspelled for entry about menu action
':' misbehaving under curses, but the phrasing for whole entry was
difficult to comprehend so try to word it better.
[This one is in the highlights list with the old wording.]
PatR [Wed, 6 Nov 2019 18:52:48 +0000 (10:52 -0800)]
unix USE_FCNTL vs 'perm'
Reported directly to devteam, the POSIX_TYPES subset (most? all
these days?) of Unix that defines USE_FCNTL was unlocking lock file
'perm' when done with it but wasn't explicitly closing it unless
the unlocking failed. Triggered a valgrind complaint and could have
posed a problem if restart gets implemented for this configuraiton.
PatR [Wed, 6 Nov 2019 18:06:59 +0000 (10:06 -0800)]
fix #H9407 - "butterfiles"
Feedback when playing music while hallucinating misspelled
"butterflies".
Other bits in the same code (not part of #H9407):
All feedback messages while impaired gave "You produce <something>"
which was immediately followed by many of the instruments giving
their own "You produce <some other thing>." Change the verb for the
playing-while-impaired messages to avoid having two consecutive
"you produce" ones.
Also, multiple impairments (two or more of stunned, confused, and
hallucinating) always gave the generic "what you produce is far
from music" message. Have them sometimes ignore excess impairments
to give the message for one of those.
nhmall [Mon, 4 Nov 2019 17:28:25 +0000 (12:28 -0500)]
code maintenance bit to white-list current "You hear" instances
Flag existing occurrences of "You hear" as "Deaf-aware" so
that a grep for that string in the future doesn't need to
trigger further investigation of those.
PatR [Mon, 4 Nov 2019 17:14:18 +0000 (09:14 -0800)]
dipping into holy/unholy water while blind
Something I realized while following up a newsgroup post. If you
knew an item's bless/curse state and dipped it into water while
blind, the bknown flag stayed set and you learned the item's new
bless/curse state without seeing any "glows blue/black/&c" feedback.
Clear the flag unless you know that the potion being dipped into is
water (or is clear if not water has not been discovered) and also
know the water potion's own bless/curse state.