Commit Graph

3441 Commits

Author SHA1 Message Date
PatR
8eca3a99ab giant {spider,beetle} fixes entry 2019-12-23 16:35:12 -08:00
nhmall
11e003cb47 add a requested interface adjustment for menu invert operations
Originally requested by one of the hardfought admins

Adjust all active window ports (tty, curses, win32, Qt, X11) to store
the itemflags that they receive with each item.

Also, make those active window ports understand the new
MENU_ITEMFLAGS_SKIPINVERT flag by skipping any menu items with that
setting during invert_all and invert_page operations.

Build testing and rudimentary functionality testing was carried out
on each of the window ports listed above.

The code was also modified on some non-active window ports (Qt3, gem,
gnome) but it was not tested for build or function there.

The desired functionality expressed was to be able to select a
single object category, and use the @ "invert all" function to
exclude that one and select all the others.

The "invert all" function's behavior of also including things
like "select all" and BUCX menu items made the feature unuseful
for that purpose.
2019-12-23 10:44:07 -05:00
nhw_cron
181470bf66 This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt 2019-12-22 20:37:03 -05:00
PatR
e0c67f49fc fix mysterious force bug
Subtracting one dungeon depth value from another had the subtraction
backwards and that yielded a negative value where a positive one is
expected.  If NH_RELEASE_STATUS were to be set to NH_STATUS_RELEASED
then this was at risk of crashing (if the bad subtraction yields -2,
rn2(diff+2) would divide by 0) since rn2()'s argument isn't validated
for released version.

fixes37.0 was confused, listing a couple of things that aren't bugs
in 3.6 as general fixes.  I suspect that the DLB one was fixed before
being exposed via git, so shouldn't be there at all.
2019-12-22 17:22:07 -08:00
nhmall
d48f2a62ba doc bit 2019-12-22 19:04:35 -05:00
nhmall
308943aea4 groundwork for window port interface change to add_menu
groundwork only - window port interface change

This changes the last parameter for add_menu() from a boolean
to an unsigned int, to allow additional itemflags in future
beyond just the "preselected" that the original boolean offered.

There shouldn't be any functionality changes with this groundwork-only
change, and if there are it is unintentional and should be reported.
2019-12-22 18:28:24 -05:00
PatR
0f1284f068 wielding partial stack
If you're wielding a stack of N items, issuing the command to quiver
them asks whether you want to quiver N-1 of them (implicitly leaving
one wielded).  If you answer no then you're asked whether to quiver
all of them.  You could also give a count when picking the item to be
quivered and the stack would be split based on that.

However, if you have a stack of N items quivered, issuing the command
to wield them just did so, leaving the quiver empty.  And picking an
item ignored any count, so even explicitly asking for 1 (out of N)
wielded the whole stack.  Change 'w' to parallel 'Q'; if you try to
wield a quivered stack, you'll be asked whether to wield just 1 of
them.  For no, ask whether to wield the whole stack.  Or you can give
an explicit count when picking any stack in inventory to wield.

Both 'w' and 'Q' probably ought to handle the alternate/secondary
weapon similarly when it contains a stack.  This doesn't address that.
2019-12-22 14:51:05 -08:00
nhmall
9c0e8190eb urealtime.realtime was being calculated incorrectly
Looks like a merge gone awry perhaps.

Fixes #270
2019-12-22 17:23:18 -05:00
nhmall
4079c50cb3 urealtime.realtime was being incorrectly calculated
Looks like a branch merge gone awry perhaps.

fixes #270
2019-12-22 17:21:02 -05:00
PatR
c3fb94104b 'quick_farsight' option
Bite the bullet and add a special purpose boolean option to control
game behavior for random clairvoyance.  When objects or monsters are
discovered, it normally issues "you sense your surroundings" and
performs a getpos() operation which allows the player to browse the
map by moving the cursor around and getting 'autodescribe' feedback.
But there have been complaints that once the hero has the Amulet
(which triggers random clairvoyance even though hero isn't flagged
as having that attribute) the message and pause-to-browse become too
intrusive.

This was initially combined with the 'timed clairvoyance' fix because
they both bump EDITLEVEL to invalidate existing save files, but their
details don't interact so I separated them.
2019-12-22 13:40:59 -08:00
PatR
48a82fea8c fix github issue #266 - timed clairvoyance
When the hero has random clairvoyance, the code used
| (moves % 15) == 0 && rn2(2) != 0
(where 'moves' is actually the turn number) to decide when it would
kick in and show a portion of the map.  If the hero was fast enough
to get an extra move when the turn value met the (moves % 15) == 0
condition then clairvoyance could happen twice (or more if poly'd)
on the same turn.

The changes (one new field, reordering a few others) in 'struct
context' invalidate existing 3.7.0-x save files.

Fixes #266
2019-12-22 13:30:25 -08:00
Pasi Kallinen
2c3be8ebe1 Prevent accessing outside the mons array 2019-12-20 15:19:14 +02:00
nhmall
c99d614ec3 Merge branch 'master' into NetHack-3.7 2019-12-18 17:25:13 -05:00
nhmall
5be18f5aca Merge branch 'NetHack-3.6' 2019-12-18 17:21:23 -05:00
nhmall
843bb5cfc9 landing spot for post-3.6.4 patches if needed
This is a landing spot.
2019-12-18 16:49:55 -05:00
nhw_cron
d6189cb43a This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt 2019-12-18 08:22:01 -05:00
nhmall
98976b3141 Merge branch 'NetHack-3.6' 2019-12-18 07:38:59 -05:00
nhw_cron
7348621e41 This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt 2019-12-18 07:15:54 -05:00
nhmall
96155c7e02 housekeeping updates 2019-12-17 23:38:06 -05:00
nhmall
9815cceae6 Merge branch 'NetHack-3.6' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6 2019-12-17 23:18:06 -05:00
nhmall
5f0d06fb80 update and simplify the windows portable_device_paths sysconf option
Requires a sysconf file in the windows executable directory in order to work
2019-12-17 23:16:44 -05:00
PatR
8349d95992 ceiling hiders vs '>'
Poly'd hero hiding on the ceiling was told "you can't go down here"
if using '>' at a spot that didn't have down stairs, trap door, hole,
or pit.  Let '>' bring a ceiling hider out of hiding; lurker above
resumes flying, piercer falls to floor or whatever is underneath it.
2019-12-17 19:08:26 -08:00
PatR
512f886ca6 wizard mode wishing for terrain
Fix some issues noticed when experimenting with ceiling hiders.
They're all blind (at least without the monks' Eyes) and some of
the behavior while blind seemed to be incorrect (though some that
I thought was wrong turned out to be ok; feel_newsym() won't update
the map if the hero can't reach the floor).  Fixing that made me
notice that some terrain side-effects (being underwater or stuck in
lava) weren't getting disabled when the underlying terrain wasn't
the corresponding type anymore.
2019-12-17 18:14:08 -08:00
nhmall
c7f070bf22 Merge branch 'NetHack-3.6' part 2 2019-12-17 14:58:00 -05:00
nhmall
b8daaf4c88 Merge branch 'NetHack-3.6' 2019-12-17 14:57:48 -05:00
nhw_cron
71b7d6299c This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt 2019-12-17 14:53:51 -05:00
nhmall
17feb01d8f Merge branch 'NetHack-3.6' 2019-12-17 14:39:15 -05:00
nhmall
853a4608f0 Merge branch 'housekeeping-to-merge-at-3.6.4-release' into NetHack-3.6 2019-12-17 14:19:20 -05:00
PatR
f4a840a48f fix potential buffer overflow loading config file 2019-12-17 14:17:55 -05:00
nhmall
74a5339a5e housekeeping updates for 3.6.4
typos

README update
2019-12-17 14:11:52 -05:00
nhmall
0d823fe1be Merge branch 'master' into NetHack-3.7 2019-12-17 12:21:06 -05:00
nhmall
98bd6b774f Merge branch 'NetHack-3.6' 2019-12-17 12:20:52 -05:00
nhmall
7c359f9dc8 remove fixes entry from 3.7 fixes for recent change back-ported to 3.6 lineage 2019-12-17 12:19:27 -05:00
nhmall
58241fdaf3 put original 3.7 fixes entry into 3.6 fixes file 2019-12-17 12:17:46 -05:00
nhmall
5d4208cd15 Merge branch 'NetHack-3.6' 2019-12-17 12:01:49 -05:00
nhmall
ac6e13fd7a allow run-from-removable-device configuration on Windows
Allow a way to configure NetHack to run entirely from a USB stick
or other removable device in a way that allows everything to
reside entirely on the USB stick, and nothing on the computer's
hard drive. That could be done in versions prior to 3.6.3.

Sample:

i: is a USB stick

i:\nhdist contains the NetHack Windows distribution and a sysconf
file dropped into that distribution with the following entry in it:
	portable_device_top = nethack

No device is included in the portable_device_top entry, the device
is always the device that the nethack exe resides on. If you try
to specify a device in the portable_device_top path, the device
portion will be ignored.

portable_device_top specifies the folder on the device that is writable
by NetHack and as such it cannot be the same folder that the executable
resides in.

i:\nhdist\nethack --showpaths
Variable playground locations:
    [hackdir   ]="i:\nethack\"
    [leveldir  ]="i:\nethack\"
    [savedir   ]="i:\nethack\"
    [bonesdir  ]="i:\nethack\"
    [datadir   ]="i:\nhdist\"
    [scoredir  ]="i:\nethack\"
    [lockdir   ]="i:\nethack\"
    [sysconfdir]="i:\nhdist\"
    [configdir ]="i:\nethack\"
    [troubledir]="i:\nethack\"
NetHack's system configuration file (in sysconfdir):
    "i:\nhdist\sysconf"
The loadable symbols file (in sysconfdir):
    "i:\nhdist\symbols"
Basic data files (in datadir) are collected inside:
    "i:\nhdist\nhdat363"
No end-of-game disclosure file (disabled).
Writable folder for portable device config (sysconf portable_device_top):
    "i:\nethack\"
Your personal configuration file (in configdir):
    "i:\nethack\.nethackrc"

Without that sysconf file in the NetHack distribution folder on the
USB stick with the 'portable_device_top = '  entry, the paths
return to the default locations for 3.6.3 on Windows:

i:\nhdist\nethack --showpaths
Variable playground locations:
    [hackdir   ]="C:\Users\JaneDoe\NetHack\3.6\"
    [leveldir  ]="C:\Users\JaneDoe\AppData\Local\NetHack\3.6\"
    [savedir   ]="C:\Users\JaneDoe\AppData\Local\NetHack\3.6\"
    [bonesdir  ]="C:\ProgramData\NetHack\3.6\"
    [datadir   ]="i:\nhdist\"
    [scoredir  ]="C:\ProgramData\NetHack\3.6\"
    [lockdir   ]="C:\ProgramData\NetHack\3.6\"
    [sysconfdir]="C:\ProgramData\NetHack\3.6\"
    [configdir ]="C:\Users\JaneDoe\NetHack\"
    [troubledir]="C:\Users\JaneDoe\NetHack\3.6\"
NetHack's system configuration file (in sysconfdir):
    "C:\ProgramData\NetHack\3.6\sysconf"
The loadable symbols file (in sysconfdir):
    "C:\ProgramData\NetHack\3.6\symbols"
Basic data files (in datadir) are collected inside:
    "i:\nhdist\nhdat363"
No end-of-game disclosure file (disabled).
Your personal configuration file (in configdir):
    "C:\Users\JaneDoe\NetHack\.nethackrc"
2019-12-17 00:41:55 -05:00
nhmall
edd9d5b810 flying hero should be able to pass through a hole using '>' 2019-12-16 00:25:20 -05:00
nhmall
d952eea4eb Merge branch 'NetHack-3.6' 2019-12-15 14:55:53 -05:00
Patric Mueller
9085093338 Fix compilation on platforms that split the ncurses and tinfo libraries
Some platforms compile ncurses in such a way that the tinfo library needs to
be separately linked in (e.g. Gentoo).

The tinfo library is a low-level library being used by and bundled with
ncurses.

Adding '-ltinfo' to WINTTYLIB in the hint files was considered the most robust
solution to this problem.  This still works on systems with ncurses 5.9.
Using pkg-config was ruled out as the default build of ncurses doesn't install
the necessary files.
2019-12-15 20:38:44 +01:00
nhmall
a78c8a5526 Merge branch 'NetHack-3.6' 2019-12-15 13:21:23 -05:00
nhw_cron
d654a4f5d1 This is cron-daily v1-Dec-12-2019. guidebook updated: doc/Guidebook.txt 2019-12-15 13:19:35 -05:00
keni
be01fba97a add date to Guidebook.mn title page 2019-12-15 12:38:42 -05:00
nhmall
fae36c6b86 Merge branch 'NetHack-3.6' 2019-12-14 17:35:03 -05:00
PatR
80f52d5d53 finish moving a couple of short patches to 3.6.4
And make the revised teleport portion match.
2019-12-13 17:54:00 -08:00
PatR
c0b74f6ba4 fixes typo 2019-12-13 17:39:39 -08:00
nhmall
057fff6b7c Merge branch 'NetHack-3.6' 2019-12-13 20:03:47 -05:00
PatR
84bdff6976 kinda/sorta fix github issue #246
Cherry-pick 3.7.0's 565e020573.  Again,
conflict because the fixes entry goes into a different file.

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.

Fixes #246
2019-12-13 16:15:37 -08:00
PatR
f8fbe4e989 allow teleport onto the vibrating square
Cherry-pick 3.7.0's 4a3d5f95d9
(github pull request #252).  Slightly tricky because the fix entry
nowgoes into a different file.  fixes37.0 will need fixing up.
2019-12-13 15:58:56 -08:00
nhmall
2592db64e3 Merge branch 'NetHack-3.7' 2019-12-13 17:41:03 -05:00
nhmall
f48ac58561 Merge branch 'NetHack-3.6' 2019-12-13 17:37:46 -05:00