Commit Graph
7853 Commits
Author SHA1 Message Date
PatR 595ad9a5e9 more sortloot - picking up cockatrice corpses
Yesterday's sortloot() overhaul didn't include some cockatrice corpse
handling for pickup.  If there's an object class filter in place and
pickup has been told to care about cockatrice corpses, have sortloot()
include them in the loot array even if food class isn't accepted by
the filter.  In the pre-sortloot days, and in 3.6.[01] which didn't
attempt to deliver a filtered subset of loot, the check for such
corpses was done before pickup checks the filter.  They need to be in
the loot array to retain the same behavior.
2018-06-11 16:32:34 -04:00
PatR 77d478c939 fix #H7205, #H7120, #H5216 - sortloot
H7205 - full-pack identify might skip items if perm_invent is on
        because updating the inventory window might reorder 'invent'
        while the identify code is in the midst of traversing it;
H7120 - pickup that doesn't pick anything up can change the glyph
        shown on the map because the pile might be reordered such
        that a different item is on top;
H5216 - performing a sortloot operation on a pile and then switching
        back to sortloot:none doesn't restore pile's original order.

The 'revamp' that changed the contributed sortloot feature to switch
to simpler usage (object list itself was sorted rather than having a
parallel array that needed to be constructed, sorted, traversed, and
discarded) turns out to have too many problems.  This reverts to a
hybrid solution that constructs an array for traversal, leaving the
linked list in its original order, but hides most of the details of
that from sortloot() callers.  The 'revamp' benefit of being able to
use normal list traversal is lost, as is the potential to skip
sorting when the list turns out to already be in the desired order.

This could stand to have a lot more testing than it's had so far.
2018-06-11 16:31:58 -04:00
PatR 7951557057 makeknown()
Noticed while investigating the report about sortloot interacting
with persistent inventory window when identifying all of invent and
possibly skipping some items.  [This doesn't fix that.]

End of game disclosure was using makeknown() on inventory.  It is a
jacket around discover_object() which passes the flag to exercise
Wisdom.  That's useless at end of game [now; conceivably wrong if
disclosure of characteristics exercise ever got added], so call
discover_object() directly to suppress exercise of Wisdom.

discover_object() was also calling update_inventory() for every item
being discovered.  That's not useful when looping through inventory
at end of game.
2018-06-11 16:31:36 -04:00
PatR 0b52288154 more sortloot - picking up cockatrice corpses
Yesterday's sortloot() overhaul didn't include some cockatrice corpse
handling for pickup.  If there's an object class filter in place and
pickup has been told to care about cockatrice corpses, have sortloot()
include them in the loot array even if food class isn't accepted by
the filter.  In the pre-sortloot days, and in 3.6.[01] which didn't
attempt to deliver a filtered subset of loot, the check for such
corpses was done before pickup checks the filter.  They need to be in
the loot array to retain the same behavior.
2018-06-10 18:02:20 -07:00
PatR c7f357e783 fix #H7205, #H7120, #H5216 - sortloot
H7205 - full-pack identify might skip items if perm_invent is on
        because updating the inventory window might reorder 'invent'
        while the identify code is in the midst of traversing it;
H7120 - pickup that doesn't pick anything up can change the glyph
        shown on the map because the pile might be reordered such
        that a different item is on top;
H5216 - performing a sortloot operation on a pile and then switching
        back to sortloot:none doesn't restore pile's original order.

The 'revamp' that changed the contributed sortloot feature to switch
to simpler usage (object list itself was sorted rather than having a
parallel array that needed to be constructed, sorted, traversed, and
discarded) turns out to have too many problems.  This reverts to a
hybrid solution that constructs an array for traversal, leaving the
linked list in its original order, but hides most of the details of
that from sortloot() callers.  The 'revamp' benefit of being able to
use normal list traversal is lost, as is the potential to skip
sorting when the list turns out to already be in the desired order.

This could stand to have a lot more testing than it's had so far.
2018-06-09 18:03:37 -07:00
PatR fc2d38ed50 makeknown()
Noticed while investigating the report about sortloot interacting
with persistent inventory window when identifying all of invent and
possibly skipping some items.  [This doesn't fix that.]

End of game disclosure was using makeknown() on inventory.  It is a
jacket around discover_object() which passes the flag to exercise
Wisdom.  That's useless at end of game [now; conceivably wrong if
disclosure of characteristics exercise ever got added], so call
discover_object() directly to suppress exercise of Wisdom.

discover_object() was also calling update_inventory() for every item
being discovered.  That's not useful when looping through inventory
at end of game.
2018-06-06 17:45:44 -07:00
keni 0e51afc7cd update Files attributes with priorities and %s substitution 2018-05-31 21:42:06 -04:00
keni a1b19734e9 update autogenerated Files file 2018-05-29 19:33:33 -04:00
keni 13db5d2db8 add autogenerated Files 2018-05-29 19:31:40 -04:00
keni e7b901419b Merge branch 'NetHack-3.6.2' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2 2018-05-29 19:31:18 -04:00
keni 9858f69fa8 update .gitattributes files for auto-generation of Files 2018-05-29 19:28:26 -04:00
nhmall d82564cf5a Merge branch 'NetHack-3.6.2' 2018-05-28 08:46:48 -04:00
nhmall 1886492a91 Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-05-28 08:46:17 -04:00
nhmall 15995375dd Guidebook date for merge verification 2018-05-28 08:45:35 -04:00
nhmall 150139f7cd Merge branch 'NetHack-3.6.2-beta01' 2018-05-28 08:30:30 -04:00
nhmall 29ecc5761b Merge branch 'NetHack-3.6.2-beta01' into NetHack-3.6.2 2018-05-28 08:30:06 -04:00
nhmall 2b52b093e7 expand on patch 2 so far in patchlevel.h 2018-05-27 21:39:20 -04:00
nhmall 9ec7961272 patchlevel.h update 2018-05-27 21:33:35 -04:00
nhmall 82afd4b17c Merge branch 'NetHack-3.6.2' 2018-05-27 21:32:11 -04:00
nhmall 959f0e557b Guidebook 2018-05-27 13:44:46 -04:00
nhmall dfdd44249e Guidebook 2018-05-27 17:39:16 +00:00
nhmall d9975e5afc Revert "update some history"
This reverts commit 61bf743fb1.
2018-05-27 11:50:57 -04:00
nhmall acfc1d1fe8 Revert "Guidebook.tex typo"
This reverts commit d9ce033915.
2018-05-27 11:50:36 -04:00
nhmall 2b1b4cc768 Revert "Update Guidebook.txt"
This reverts commit ad52611a6b.
2018-05-27 11:50:19 -04:00
nhmall 283bcbbfd0 Revert "yet more Guidebook"
This reverts commit ff80f6be74.
2018-05-27 11:49:59 -04:00
nhmall 6f82802364 Revert "more pre-release updates"
This reverts commit 175b0b1960.
2018-05-27 11:04:46 -04:00
nhmall ec8c01f310 Revert "update Files"
This reverts commit e4f23a929c.
2018-05-27 11:04:19 -04:00
nhmall b92296dc54 Revert "generted files not present in the source tree updated in Files"
This reverts commit d2788d0c04.
2018-05-27 11:03:56 -04:00
nhmall e6eb8162c3 Revert "prep bit makedefs.c"
This reverts commit 9ad1690bdb.
2018-05-27 11:03:32 -04:00
nhmall 1007dd0672 Revert "remove unmaintained Files from distribution"
This reverts commit d09d427831.
2018-05-27 11:03:07 -04:00
nhmall 0dda4b4546 Revert "README bit"
This reverts commit aec409262e.
2018-05-27 11:02:45 -04:00
nhmall aec409262e README bit 2018-05-26 20:37:06 -04:00
nhmall d09d427831 remove unmaintained Files from distribution 2018-05-26 20:15:37 -04:00
nhmall 9ad1690bdb prep bit makedefs.c 2018-05-26 20:04:04 -04:00
nhmall d2788d0c04 generted files not present in the source tree updated in Files 2018-05-26 19:47:00 -04:00
nhmall e4f23a929c update Files
Done via automation
2018-05-26 19:27:00 -04:00
nhmall ced7ebafec Merge branch 'NetHack-3.6.2' 2018-05-26 19:02:43 -04:00
nhmall 175b0b1960 more pre-release updates 2018-05-26 18:55:28 -04:00
nhmall 8cec582b9b Merge branch 'NetHack-3.6.2' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2 2018-05-26 18:47:16 -04:00
nhmall ff80f6be74 yet more Guidebook 2018-05-26 22:43:09 +00:00
nhmall afcbf56168 more Guidebook 2018-05-26 18:39:19 -04:00
nhmall ad52611a6b Update Guidebook.txt 2018-05-26 22:32:46 +00:00
nhmall d9ce033915 Guidebook.tex typo 2018-05-26 18:27:29 -04:00
nhmall 61bf743fb1 update some history 2018-05-26 18:23:19 -04:00
nhmall e41c80e5eb missed one 2018-05-25 18:57:41 -04:00
nhmall 6c9aa091cd guidebk.txt over guideboo.txt 2018-05-25 18:52:26 -04:00
nhmall 4d7f2869c6 Merge branch 'msdos-build' of https://github.com/chasonr/NetHack into msdos 2018-05-25 18:42:50 -04:00
nhmall 3a027289ed Merge branch 'NetHack-3.6.2' 2018-05-25 18:36:30 -04:00
Ray Chason bd5743f758 MS-DOS does not use getreturn_enabled 2018-05-23 21:44:42 -04:00
Ray Chason 2357cb3fc2 Work around quirky FreeDOS behavior 2018-05-23 21:44:20 -04:00