new composite status conditions: weaponstatus,\

armorstatus, and terrainstatus

This adds three special status items to show at a glance what the hero
is wielding, wearing, and standing on.

Each of the three items has its own boolean option rather than try to
fix them in with the existing opttional status conditions.  After a
lot of testing, I think the weapon and armor ones will prove useful
but the terrain one probably won't be.

Presently it is implemented for tty and curses.  When I developed it
six years ago, it was also working for X11 but I'm not able to test
the resurrection of that part so have left it out.
This commit is contained in:
PatR
2026-04-16 13:35:08 -07:00
parent 45e8305918
commit 84ddf85cb4
20 changed files with 659 additions and 72 deletions

View File

@@ -164,6 +164,9 @@ static int optfn_##a(int, int, boolean, char *, char *);
Off, Yes, No, No, NoAlias, (boolean *) 0, Term_False,
(char *)0)
#endif
NHOPTB(armorstatus, Status, 0, opt_in, set_in_game,
Off, Yes, No, No, NoAlias, &flags.armorstatus, Term_False,
"summarize currently worn armor in a status field")
NHOPTB(ascii_map, Advanced, 0, opt_in, set_in_game,
ascii_map_Def, Yes, No, No, NoAlias, &iflags.wc_ascii_map,
Term_False, "show map as text")
@@ -741,6 +744,9 @@ static int optfn_##a(int, int, boolean, char *, char *);
No, Yes, No, No, "termcolumns", "number of columns")
NHOPTC(term_rows, Advanced, 6, opt_in, set_in_config,
No, Yes, No, No, NoAlias, "number of rows")
NHOPTB(terrainstatus, Status, 0, opt_in, set_in_game,
Off, Yes, No, No, NoAlias, &flags.terrainstatus, Term_False,
"show hero's location as a status field")
NHOPTC(tile_file, Advanced, 70, opt_in, set_gameview,
No, Yes, No, No, NoAlias, "name of tile file")
NHOPTC(tile_height, Advanced, 20, opt_in, set_gameview,
@@ -853,6 +859,9 @@ static int optfn_##a(int, int, boolean, char *, char *);
#endif
NHOPTC(warnings, Advanced, 10, opt_in, set_in_config,
No, Yes, No, No, NoAlias, "display characters for warnings")
NHOPTB(weaponstatus, Status, 0, opt_in, set_in_game,
Off, Yes, No, No, NoAlias, &flags.weaponstatus, Term_False,
"show currently wielded weapon in a status field")
NHOPTC(whatis_coord, Advanced, 1, opt_in, set_in_game,
Yes, Yes, No, Yes, NoAlias,
"show coordinates when auto-describing cursor position")