item actions for '* ) [ = " (' commands

Make the various item-in-use commands put up a menu--which allows
choosing an item for context-sensitive item action--if/when preceded
by the 'm' prefix.  Some of them do that even without the prefix ('*',
'[', or '=' when more than one ring is worn).  By default '(' shows
primary weapon, then secondary one if dual-wielding.  'm (' shows a
menu of primary, alternate whether dual-wielding it or not, and quiver.
This commit is contained in:
PatR
2023-11-28 00:31:21 -08:00
parent 75104c69ab
commit e6a7eb25d4
5 changed files with 184 additions and 63 deletions

View File

@@ -2698,17 +2698,17 @@ struct ext_func_tab extcmdlist[] = {
{ 's', "search", "search for traps and secret doors",
dosearch, IFBURIED | CMD_M_PREFIX, "searching" },
{ '*', "seeall", "show all equipment in use",
doprinuse, IFBURIED, NULL },
doprinuse, IFBURIED | CMD_M_PREFIX, NULL },
{ AMULET_SYM, "seeamulet", "show the amulet currently worn",
dopramulet, IFBURIED, NULL },
dopramulet, IFBURIED | CMD_M_PREFIX, NULL },
{ ARMOR_SYM, "seearmor", "show the armor currently worn",
doprarm, IFBURIED, NULL },
doprarm, IFBURIED | CMD_M_PREFIX, NULL },
{ RING_SYM, "seerings", "show the ring(s) currently worn",
doprring, IFBURIED, NULL },
doprring, IFBURIED | CMD_M_PREFIX, NULL },
{ TOOL_SYM, "seetools", "show the tools currently in use",
doprtool, IFBURIED, NULL },
doprtool, IFBURIED | CMD_M_PREFIX, NULL },
{ WEAPON_SYM, "seeweapon", "show the weapon currently wielded",
doprwep, IFBURIED, NULL },
doprwep, IFBURIED | CMD_M_PREFIX, NULL },
{ '!', "shell", "leave game to enter a sub-shell ('exit' to come back)",
dosh_core, (IFBURIED | GENERALCMD | NOFUZZERCMD
#ifndef SHELL
@@ -2717,7 +2717,7 @@ struct ext_func_tab extcmdlist[] = {
), NULL },
/* $ is like ),=,&c but is not included with *, so not called "seegold" */
{ GOLD_SYM, "showgold", "show gold, possibly shop credit or debt",
doprgold, IFBURIED, NULL },
doprgold, IFBURIED | CMD_M_PREFIX, NULL },
{ SPBOOK_SYM, "showspells", "list and reorder known spells",
dovspell, IFBURIED, NULL },
{ '^', "showtrap", "describe an adjacent, discovered trap",