When picking up from floor or removing from container fails because
there aren't any inventory slots available, pickup/take-out stops.
But the message
|Your knapsack can't accomodate any more items.
is inaccurate if there is gold beyond the stopping point. Actually
continuing in order to pickup/take-out gold would require substantial
changes, but varying the message to be
|Your knapsack can't accomodate any more items (except gold).
when stopping is a one line fix. The parenthesized remark is only
added if there is actually some gold after the current object and is
given regardless of whether autopickup happens to be targetting it.
PatR [Fri, 13 Dec 2019 23:58:56 +0000 (15:58 -0800)]
allow teleport onto the vibrating square
Cherry-pick 3.7.0's 4a3d5f95d9e724a77cb94ff885b333c8c1c70b0d
(github pull request #252). Slightly tricky because the fix entry
nowgoes into a different file. fixes37.0 will need fixing up.
PatR [Fri, 13 Dec 2019 22:01:28 +0000 (14:01 -0800)]
polymorphed steed phrasing
When you ride your steed into a polymorph trap and it changes into a
creature that can still wear the saddle, the message is
|You have to adjust youself in the saddle on <foo>.
which sounds as if the game is telling the player that he or she needs
to do something. Simplify it to
|You adjust yourself in the saddle on <foo>.
PatR [Fri, 6 Dec 2019 20:59:18 +0000 (12:59 -0800)]
PANICTRACE memory leak
Changing from BETA to RELEASED resulted in turning off PANICTRACE
and that exposed a minor memory leak. Only applies to program exit
so doesn't impact play.
nhmall [Wed, 4 Dec 2019 04:32:12 +0000 (23:32 -0500)]
fix self-recover prompting on windows
the prompting on Windows wasn't working correctly if a prior game had crashed
and the self-recover feature was trying to kick in. This impacts tty, curses,
and mswin (GUI).
PatR [Sun, 1 Dec 2019 04:19:10 +0000 (20:19 -0800)]
fix #H9479 - worn dented pot can't be taken off
Taking off no-delay helmets, gloves, and boots were unintentionally
taking off suit instead and stayed worn themselves. As far as I
saw, only helmet types "fedora" and "dented pot" were applicable;
all gloves and boots have a small multi-turn delay. This was an
unintended side-effect of the first "slippery gloves" commit so
happened about three weeks ago.
nhmall [Sat, 30 Nov 2019 16:44:07 +0000 (11:44 -0500)]
has_color() performance fixes
Performance profiling showed that multiple strcmpi() calls were
occurring each and every time a character was going to the map.
This update:
- honors the WC_COLOR capability
- It allows a window-port to control individual color availability should the window-port wish to do so.
- Makes checking on the individual colors for the active window-port is a straightforward table lookup at the CLR_ offset.
iflags.use_color remains a master on/off switch for use of color, regardless of the capability
compiled into the game (default TRUE).
The has_color() routine, which is now a shared routine in src/windows.c, could likely be made
into a simple macro to eliminate the function call, but this update does not go that far.
This hits a lot of port files due to the window-port interface change, mostly cookie-cutter.
PatR [Fri, 29 Nov 2019 19:38:42 +0000 (11:38 -0800)]
fix teetering typo
do.c:1005:54: warning: address of function 'uescaped_shaft' will always
evaluate to 'true' [-Wpointer-bool-conversion]
if (trap && (uteetering_at_seen_pit(trap) || uescaped_shaft)) {
~~ ^~~~~~~~~~~~~~
PatR [Thu, 28 Nov 2019 00:27:13 +0000 (16:27 -0800)]
paranoid_confirmation:eating
Add 'eating' (synonym 'continue') to the list of things that can be
set via paranoid_confirmation to require "yes" instead of "y" when
the user is prompted about something, in this case "Continue eating?".
dat/opthelp was missing a few of the paranoid_confirmation choices.
nhmall [Wed, 27 Nov 2019 22:19:55 +0000 (17:19 -0500)]
number pad changes from pull request #247
Below is the accompanying text from the pull request on
GitHub https://github.com/NetHack/NetHack/pull/247:
> This fixes the issue brought up in https://www.reddit.com/r/nethack/comments/dv3pae/curses_and_the_numberpad/?st=k3hgply6&sh=dbc2bf7d .
>
> I don't know why the "regular" (tty) method doesn't seem to work for him,
> but I'm going to chalk it up to a PDCurses oddity. What I do know, however,
> is that the alternate method I added a year ago or maybe longer, that allows
> numpad usage even with number_pad:0 (to retain the default keybindings in case
> an user is used to them, while keeping number pad behaviour making sense,
> similar to NetHack4+friends) was only partially implemented, for some reason.
> This adds the rest of the keys, meaning that this means of key interpretation
> should be more realible. KEY_A2/B1/B3/C2 are not standard keys in the Curses
> documentation, and is thus behind an ifdef -- but PDCurses, amongst other
> implementations, makes use of them.
>
> As a side effect, Home/End/PgUp/PgDn are now interpreted as diagonal movement,
> since some terminals interpret number_pad keys that way. I do not consider this
> a problem since they went unused in normal gameplay anyway (This does not
> interfere with menus or similar).
PatR [Wed, 27 Nov 2019 19:24:23 +0000 (11:24 -0800)]
fix part of #H9467 - clairvoyance vs sensed mons
When a monster is drawn on the map, remove any "remembered, unseen
monster" glyph being shown at the same spot. Clairvoyance shows
all monsters in vicinty, then ones which can't be seen are replaced
with the 'I' glyph (which is on the object layer or the display,
not the monster layer show is subject to different update behavior).
But subsequent monster refresh didn't get rid of it when a sensed
monster was displayed over it. (3.6.1 included a similar fix for
warned-of monsters.)
Also during clairvoyance, don't draw an 'I' at a spot that will
immediately be refreshed with a monster because 'I' clobbers any
remembered object at the same location.
Fix alternate number pad interpretation only working for diagonals
This fixes the issue brought up at https://www.reddit.com/r/nethack/comments/dv3pae/curses_and_the_numberpad/?st=k3hgply6&sh=dbc2bf7d .
I don't know why the "regular" (tty) method doesn't seem to work for him,
but I'm going to chalk it up to a PDCurses oddity. What I do know, however,
is that the alternate method I added a year ago or maybe longer, that allows
numpad usage even with number_pad:0 (to retain the default keybindings in case
an user is used to them, while keeping number pad behaviour making sense,
similar to NetHack4+friends) was only partially implemented, for some reason.
This adds the rest of the keys, meaning that this means of key interpretation
should be more realible. KEY_A2/B1/B3/C2 are not standard keys in the Curses
documentation, and is thus behind an ifdef -- but PDCurses, amongst other
implementations, makes use of them.
As a side effect, Home/End/PgUp/PgDn are now interpreted as diagonal movement,
since some terminals interpret number_pad keys that way. I do not consider this
a problem since they went unused in normal gameplay anyway (This does not
interfere with menus or similar).
PatR [Mon, 25 Nov 2019 23:01:40 +0000 (15:01 -0800)]
alignment of mimicked or polymorphed altars
A reddit thread about an unaligned altar in an aligned temple was
a tipoff that mimics posing as altars didn't have any particular
alignment. The look-at code was misusing an operloaded field of the
underlying terrain. Pick an alignment at random when taking on the
appearance of an altar, store it in the mimic's mon->mextra->mcorpsenm
field, and have look-at use that.
Also, dropping a ring of polymorph into a sink can transform it, and
one possible outcome is an altar. In this case, the alignment is
part of the location's topology, but code setting that up was using
Align2amask(rn2(foo)). That's a macro which evaluates its argument
more than once. The first evaluation was effectively a no-op. If
the second evaluation picked lawful then the result was lawful as
intended. But if the second picked non-lawful and the third picked
lawful, the result would end up as none-of-the-above (a value of 3
when it needs to be a single-bit mask of 1, 2, or 4).
PatR [Sun, 24 Nov 2019 23:33:16 +0000 (15:33 -0800)]
fix #H9462 - segfault with levitation boots
This is similar to the helm of opposite alignment case fixed some
time ago. Deferring the setting of foo->known until an item is fully
worn (because it used to get set earlier but gave away information if
the wear operation was interrupted) didn't take into account that foo
might end up Null in various circumstances. So Boots_on() needs to
validate uarmf before setting uarmf->known in case putting on boots
of levitation while on a sink caused them to come right back off.
I put similar validation into all foo_on() just in case (as far as
I'm aware, only Boots_on() and Helmet_on() actually need that).
PatR [Sat, 23 Nov 2019 17:28:08 +0000 (09:28 -0800)]
more #H9375 - Rider bargethrough
I think the previous expression would allow moving (via swapping
places) from a pool to solid rock or closed door which was not what
was intended (but moot since there aren't any pools on the Astral
level). This revised expression does what is intended: can only
swap to a pool location if already located in/over (the Riders fly?
they should probably be non-breathing) another pool.
PatR [Sat, 23 Nov 2019 02:16:59 +0000 (18:16 -0800)]
fix #H9375 - unintended Rider corpse suppression
Don't let Riders swap places with something (fog or ooze, perhaps)
located at a closed door spot because if it gets killed there, there
won't be any corpse and it will stop auto-reviving.
Just avoid moving to spots where mondied() won't place a corpse
instead of worrying about whether a bargethrough creature (if there
ever are any besides the Riders) might be able to survive at the
destination (so ignore pass-walls, door-opening, swimming, &c).
PatR [Fri, 22 Nov 2019 10:46:28 +0000 (02:46 -0800)]
docall fix
Noticed while testing something: hero drank a potion of see invisible
and nearby invisible monster could now be seen--in theory--but I was
asked what to call the potion while the updated map was buffered. So
I didn't see the invisible monster until after naming the potion.
pline() flushes buffered map updates, but getlin() doesn't. I didn't
change that, but I've made docall() do so since the updated map may
make a difference in what the player can tell about whatever is being
'called'.
PatR [Fri, 22 Nov 2019 01:43:55 +0000 (17:43 -0800)]
fix part of #H9397 - hallucinatory mon names
Fix the issue where a hallucinatory monster name which begins with
a slash is having that stripped off as if it was a gendor and/or
personal-name flag.
The main issue was pronouns ignoring hallucination and this doesn't
attempt to address that.
Also, add new hallucinatory name "leathery-winged avian" which has
been lurking for a while.
PatR [Mon, 18 Nov 2019 22:28:25 +0000 (14:28 -0800)]
yet more --showpaths (dumplog)
Provide a little more information when dumplog is unavailable.
While testing various permutations, I encountered a couple of
problems with conditionally declared variables.
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.