wiz_identify change (trunk only)
This patch alters wiz_identify so that it displays an inventory menu with all items shown identified without actually identifying them. You can just press ^I (or whatever the wiz_identify command is) a second time, while the menu is displayed to actually identify them (tested with TTY menus only).
This commit is contained in:
22
src/cmd.c
22
src/cmd.c
@@ -150,6 +150,7 @@ STATIC_PTR int NDECL(doattributes);
|
||||
STATIC_PTR int NDECL(doconduct); /**/
|
||||
STATIC_PTR boolean NDECL(minimal_enlightenment);
|
||||
|
||||
STATIC_DCL char FDECL(cmd_from_func, (int NDECL((*))));
|
||||
STATIC_DCL void FDECL(enlght_line, (const char *,const char *,const char *,char *));
|
||||
STATIC_DCL char *FDECL(enlght_combatinc, (const char *,int,int,char *));
|
||||
#if defined(UNIX) || defined(SAFERHANGUP)
|
||||
@@ -516,9 +517,13 @@ wiz_wish() /* Unlimited wishes for debug mode by Paul Polderman */
|
||||
STATIC_PTR int
|
||||
wiz_identify()
|
||||
{
|
||||
if (wizard) identify_pack(0);
|
||||
else pline("Unavailable command '^I'.");
|
||||
return 0;
|
||||
if (wizard) {
|
||||
iflags.override_ID = (int)cmd_from_func(wiz_identify);
|
||||
if (display_inventory((char *)0, TRUE) == -1)
|
||||
identify_pack(0);
|
||||
iflags.override_ID = 0;
|
||||
} else pline("Unavailable command '^I'.");
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* ^F command - reveal the level map and any traps on it */
|
||||
@@ -1749,6 +1754,17 @@ boolean initial;
|
||||
Cmd.move_SW = Cmd.dirchars[7];
|
||||
}
|
||||
|
||||
STATIC_OVL char
|
||||
cmd_from_func(fn)
|
||||
int NDECL((*fn));
|
||||
{
|
||||
int i;
|
||||
for (i = 0; i < SIZE(cmdlist); ++i)
|
||||
if (cmdlist[i].f_funct == fn)
|
||||
return cmdlist[i].f_char;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* decide whether a character (user input keystroke) requests screen repaint */
|
||||
boolean
|
||||
redraw_cmd(c)
|
||||
|
||||
Reference in New Issue
Block a user