MCPcopy Index your code
hub / github.com/NetHack/NetHack / wiz_identify

Function wiz_identify

src/wizcmds.c:46–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46DISABLE_WARNING_FORMAT_NONLITERAL
47
48/* #wizidentify command - reveal and optionally identify hero's inventory */
49int
50wiz_identify(void)
51{
52 if (wizard) {
53 iflags.override_ID = (int) cmd_from_func(wiz_identify);
54 /* command remapping might leave #wizidentify as the only way
55 to invoke us, in which case cmd_from_func() will yield NUL;
56 it won't matter to display_inventory()/display_pickinv()
57 if ^I invokes some other command--what matters is that
58 display_pickinv() and xname() see override_ID as nonzero */
59 if (!iflags.override_ID)
60 iflags.override_ID = C('I');
61 (void) display_inventory((char *) 0, FALSE);
62 iflags.override_ID = 0;
63 } else
64 pline(unavailcmd, ecname_from_fn(wiz_identify));
65 return ECMD_OK;
66}
67
68RESTORE_WARNING_FORMAT_NONLITERAL
69

Callers

nothing calls this directly

Calls 4

cmd_from_funcFunction · 0.85
display_inventoryFunction · 0.85
ecname_from_fnFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected