Files
nethack/doc
PatR c63d3fbfbb bogus status updates
I finally figured out why status gets updated periodically even if
none of the fields have changed.  Once a temporary highlight times
out, it starts a cycle of timeouts every 'statushilites' turns.  When
I worked on this before, it was convoluted but not this convoluted.

In moveloop, if 'context.botl' call bot; in bot
  call evaluate_and_notify_windowport;
  for each field, call evaluate_and_notify_windowport_field:
    call hilite_reset_needed and set 'reset' to the result;
    if 'reset' is True then do status_update
      and set 'curr->chg' and 'prev->chg' to True.
Then in moveloop call status_eval_next_unhilite:
  for each field
    if 'curr->chg' set 'curr->time' to moves+hilite_delta;
    on the call after hilite_delta ('statushilites') moves,
      call hilite_reset_needed which returns True if there is any
      rule for temporary highlight and set 'context.botl'.
Go back to start.  If multiple fields had temporary timeouts and
they were activated on different turns so expired on different turns
you could conceivably end up with context.botl being set every turn.

My first writeup trying to explain all this was wrong.  I won't
testify about the accuracy of this one in court....

This extends the highlighting data structure to track the current
rule that's in use.  And for that to make sense, it eliminates the
merging of settings from multiple matching rules.  So anybody with
 hit-points/up/inverse
 hit-points/up/green
 hit-points/up/bold
will need to manually merge their rules like
 hit-points/up/green&inverse+bold
or else whichever rule matches last will be the only one in effect.

There are a lot of miscellaneous changes made as I flailed about.
The three most significant ones are that there is no guesswork over
what kind of highlight rule is in effect, status_eval_next_unhilite
will only set a timeout value if the current rule is for a temporary
highlight, and hilite_reset_needed will only return True if a timeout
is for a temporary highlight (probably moot after the _next_unhilite
change).
2019-03-31 00:33:33 -07:00
..
2018-11-11 10:29:52 -05:00
2019-01-08 13:56:59 -08:00
2018-09-19 21:46:07 -05:00
2018-04-25 16:54:50 -04:00
2002-01-05 21:05:47 +00:00
2018-04-25 16:54:50 -04:00
2002-01-05 21:05:47 +00:00
2018-09-21 16:36:38 -04:00
2018-09-21 18:12:42 -07:00
2018-09-21 18:12:42 -07:00
2018-04-25 16:54:50 -04:00
2018-09-21 18:12:42 -07:00
2018-09-21 18:12:42 -07:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2018-09-21 18:12:42 -07:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2002-01-05 21:05:47 +00:00
2003-05-11 13:40:01 +00:00
2018-04-25 16:54:50 -04:00
2018-04-25 16:54:50 -04:00
2018-04-25 16:54:50 -04:00
2018-04-25 16:54:50 -04:00
2018-04-25 16:54:50 -04:00
2018-09-21 18:12:42 -07:00
2019-03-31 00:33:33 -07:00
2019-03-29 04:21:18 -07:00
2019-03-29 04:21:18 -07:00
2018-04-25 16:54:50 -04:00
2002-01-05 21:05:47 +00:00
2018-04-25 16:54:50 -04:00
2010-05-01 23:10:22 +00:00
2018-11-11 10:29:52 -05:00
2018-11-11 10:29:52 -05:00
2018-09-19 21:46:07 -05:00
2018-09-19 21:46:07 -05:00
2018-04-25 16:54:50 -04:00
2018-09-20 18:02:48 -04:00
2018-11-16 20:51:22 -05:00