Commit Graph

6980 Commits

Author SHA1 Message Date
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
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
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
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
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
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
PatR
645e1ac5b3 hilite_status title when polymorphed
Make a 'textmatch' rule for title that matches a specific monster type
while polymorphed take precedence over a "none of the above" one.
2018-05-22 19:23:03 -07:00
PatR
cb02e77589 hilite_status, what else?
While deciding which highlights to apply, give 'percentage' and/or
'absolute' rules that match precedence over 'always' rules regardless
of order within the config settings.

When using 'O' to add 'up/down/changed' rule, don't include 'down'
as a choice for field 'time'.

When using 'O' to add rules, don't squeeze out spaces if adding a
'textmatch' rule for title (to support "field worker", "high priest",
"student of stones", and so forth).

While deciding which highlights to apply, ignore double quotes when
testing whether a 'textmatch' rule matches the current text of a
field.  This allows rules to specify string values as '"value"'
instead of just 'value'.  It not does validate them to ensure quotes
are paired at beginning and end, it just ignores them.  New rules
created via 'O' for rank title include them when displaying what the
new rule would look like as a config file option.  Other text fields
haven't been changed to show quotes but ignoring such applies to all
'textmatch' comparisons.

Expand the menu for adding 'textmatch' rules for title.  When a rank
has separate male and female titles, list three entries instead of
just one
  "male rank"
  "female rank"
  "male rank" or "female rank"
(the order of the first two entries and of the two titles in the
third entry is reversed if the current character is female).  If the
user picks the third entry, two rules are added instead of just one,
identical to each other except for the text to match.

Further expand that menu with
  "none of the above (polymorphed)"
at the end.  When deciding which highlights to apply, "none of the
above" and "(polymorphed)" and the full string are treated as
equivalent (with spaces, quotes, and parentheses ignored).  Rather
than comparing anything against the title text, it matches if the
hero is polymorphed (where title will be "<hero> the <monster-type>"
instead of "<hero> the <rank>").  Note that the user can have config
file 'textmatch' rules for title to match specific "<monster-type>"
values but the 'O' menu doesn't offer any opportunity for that.
(I've just realized that rules for specific monster types should be
given precedence over "none of the above" but at present that isn't
done; the order of the rules will determine which wins out.)
2018-05-22 10:40:55 -07:00
PatR
1e0f546740 hilite_status string comparison
Simplify the string comparison done when checking 'textmatch' rules
to decide whether to highlight something.

Fix the menu titles when setting up a textmatch via 'O':  the title
for color referred to attribute and the one for attribute used the
default.  The two tiles are set up in advance; the one for color was
set correctly but then the one for attribute was written into the
wrong buffer.

When using 'O' to manipulate hilite_status rules, if there are any
when you're done and the 'statushilites' option (iflags.hilite_delta)
is 0, give a message reminding that it needs to be non-zero for
highlighting to be activated.
2018-05-22 02:42:08 -07:00
PatR
2b8160a70d status_hilite: no more ANY_UINT
The fact that the index to the array of hunger strings is an unsigned
field in 'struct you' is unimportant as far as its usage for status
highlighting.  Since it is the only ANY_UINT field, change BL_HUNGER
to plain 'int' so that there'll be no need for ANY_UINT handling.

And some more validation when setting up highlight rules.  For 'O',
in the menu to choose a relationship after supplying a number N,
don't include "less than N" and "N or less" for percentage or
absolute--other than AC--unless N is greater than 0, and don't
include "N or more" and "more than N" for percentage unless N < 100.

Also, when 'O' prompted for a number, if you entered <X or =X (for X
not a sequence of digits), it remembered the '<' or '=' (or '>=', &c)
when reprompting for a valid number.  If the 'X' portion is invalid,
discard the relationship operator before asking for another number.
2018-05-21 19:11:18 -07:00
nhmall
f614b9e27e fix access violation in status_finish() if window port not initialized 2018-05-21 18:31:45 -04:00
nhmall
81e422189c Windows wouldn't compile without TTY_GRAPHICS defined 2018-05-21 16:44:19 -04:00
nhmall
d95dae3cf4 fix early crash during config file error processing 2018-05-21 16:39:16 -04:00
nhmall
fcc26f2c44 fixes update for previous static prototype move in rip.c 2018-05-21 10:20:17 -04:00
nhmall
8f73f85ac4 static prototype could be left orphaned depending on #defines 2018-05-21 10:14:39 -04:00
nhmall
7508b0e34e Merge branch 'NetHack-3.6.2' of https://rodney.nethack.org:20040/git/NHsource into NetHack-3.6.2 2018-05-21 09:55:44 -04:00