more new status - update genl_status_update

Make genl_status_update behave approximately the same as basic bot2
when processing the second status line.  Preferred order:
Dlvl  Gold  Hp(HpMax) Pw(PwMax) AC  Xp  Time  Conditions
Alternate orders if above exceeds COLNO (note several extra spaces
get sequeezed out).  First one is used if everything except time fits,
second one is used if everything except experience (which can be wide
if 'showexp' option is on) and time fits, third is last resort:
Dlvl Gold Hp(HpMax) Pw(PwMax) AC Xp Conditions Time
Dlvl Gold Hp(HpMax) Pw(PwMax) AC Conditions Xp Time
Hp(HpMax) Pw(PwMax) AC Conditions Dlvl Gold Xp Time

Basic bot2 currently has Conditions as
Stone Slime Strngl FoodPois TermIll <hunger> <encumbrance> Blind Deaf
 Stun Conf Hallu Lev Fly Ride
genl_status_update has
<hunger> <encumbrance> Stone Slime Strngl FoodPois TermIll Blind Deaf
 Stun Conf Hallu Lev Fly Ride
which is as close as it can get with the current field organization.

Tested by temporarily changing tty_procs.status_init and .status_update
to use genl_* instead of tty_*.
This commit is contained in:
PatR
2016-01-15 03:30:40 -08:00
parent 4d866a2217
commit 60b166aad8
3 changed files with 134 additions and 38 deletions

View File

@@ -652,7 +652,8 @@ bot()
* To work around it, we call status_update() with fictitious
* index of BL_FLUSH (-1).
*/
if (context.botlx && !updated)
if ((context.botlx && !updated)
|| windowprocs.win_status_update == genl_status_update)
status_update(BL_FLUSH, (genericptr_t) 0, 0, 0);
context.botl = context.botlx = 0;
@@ -796,7 +797,7 @@ boolean
(!flags.showexp || Upolyd) ? FALSE : TRUE);
break;
case BL_CONDITION:
fieldfmt = "%S";
fieldfmt = "%s";
fieldname = "condition";
status_enablefield(fld, fieldname, fieldfmt, TRUE);
break;