fix #K4324 - Xp and Exp highlit after restore
Experience-level and experience-points, if enabled, could be highlighted via 'up' or 'changed' rules in initial display after restore. I tried 'down' rule too but didn't produce with that. I don't understand what was going on but was able to reproduce it and then fix it via the trial and error method....
This commit is contained in:
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 allmain.c $NHDT-Date: 1726894914 2024/09/21 05:01:54 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.261 $ */
|
/* NetHack 3.7 allmain.c $NHDT-Date: 1742207239 2025/03/17 02:27:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.275 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -687,7 +687,7 @@ init_sound_disp_gamewindows(void)
|
|||||||
|
|
||||||
WIN_MESSAGE = create_nhwindow(NHW_MESSAGE);
|
WIN_MESSAGE = create_nhwindow(NHW_MESSAGE);
|
||||||
if (VIA_WINDOWPORT()) {
|
if (VIA_WINDOWPORT()) {
|
||||||
status_initialize(0);
|
status_initialize(FALSE);
|
||||||
} else {
|
} else {
|
||||||
WIN_STATUS = create_nhwindow(NHW_STATUS);
|
WIN_STATUS = create_nhwindow(NHW_STATUS);
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-6
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.7 botl.c $NHDT-Date: 1720397739 2024/07/08 00:15:39 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.264 $ */
|
/* NetHack 3.7 botl.c $NHDT-Date: 1742207239 2025/03/17 02:27:19 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.274 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Michael Allison, 2006. */
|
/*-Copyright (c) Michael Allison, 2006. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1325,7 +1325,10 @@ eval_notify_windowport_field(
|
|||||||
|
|
||||||
reset = FALSE;
|
reset = FALSE;
|
||||||
#ifdef STATUS_HILITES
|
#ifdef STATUS_HILITES
|
||||||
if (!gu.update_all && !chg && curr->time) {
|
if (gu.update_all) {
|
||||||
|
chg = 0;
|
||||||
|
curr->time = prev->time = 0L;
|
||||||
|
} else if (!chg && curr->time) {
|
||||||
reset = hilite_reset_needed(prev, gb.bl_hilite_moves);
|
reset = hilite_reset_needed(prev, gb.bl_hilite_moves);
|
||||||
if (reset)
|
if (reset)
|
||||||
curr->time = prev->time = 0L;
|
curr->time = prev->time = 0L;
|
||||||
@@ -1949,7 +1952,7 @@ static const struct fieldid_t {
|
|||||||
{ "xp", BL_EXP },
|
{ "xp", BL_EXP },
|
||||||
{ "exp", BL_EXP },
|
{ "exp", BL_EXP },
|
||||||
{ "flags", BL_CONDITION },
|
{ "flags", BL_CONDITION },
|
||||||
{0, BL_FLUSH }
|
{ NULL, BL_FLUSH }
|
||||||
};
|
};
|
||||||
|
|
||||||
/* format arguments */
|
/* format arguments */
|
||||||
@@ -2424,8 +2427,7 @@ has_ltgt_percentnumber(const char *str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* splitsubfields(): splits str in place into '+' or '&' separated strings.
|
/* splitsubfields(): splits str in place into '+' or '&' separated strings.
|
||||||
* returns number of strings, or -1 if more than maxsf or MAX_SUBFIELDS
|
returns number of strings, or -1 if more than maxsf or MAX_SUBFIELDS */
|
||||||
*/
|
|
||||||
staticfn int
|
staticfn int
|
||||||
splitsubfields(char *str, char ***sfarr, int maxsf)
|
splitsubfields(char *str, char ***sfarr, int maxsf)
|
||||||
{
|
{
|
||||||
@@ -2575,7 +2577,7 @@ parse_status_hl2(char (*s)[QBUFSZ], boolean from_configfile)
|
|||||||
/* Examples:
|
/* Examples:
|
||||||
3.6.1:
|
3.6.1:
|
||||||
OPTION=hilite_status: hitpoints/<10%/red
|
OPTION=hilite_status: hitpoints/<10%/red
|
||||||
OPTION=hilite_status: hitpoints/<10%/red/<5%/purple/1/red+blink+inverse
|
OPTION=hilite_status: hitpoints/<10%/red/<5%/purple/1/red&blink+inverse
|
||||||
OPTION=hilite_status: experience/down/red/up/green
|
OPTION=hilite_status: experience/down/red/up/green
|
||||||
OPTION=hilite_status: cap/strained/yellow/overtaxed/orange
|
OPTION=hilite_status: cap/strained/yellow/overtaxed/orange
|
||||||
OPTION=hilite_status: title/always/blue
|
OPTION=hilite_status: title/always/blue
|
||||||
|
|||||||
Reference in New Issue
Block a user