diff --git a/src/invent.c b/src/invent.c index f91026545..16e6f62e0 100644 --- a/src/invent.c +++ b/src/invent.c @@ -2679,6 +2679,7 @@ enum item_action_actions { IA_WEAR_OBJ, IA_SWAPWEAPON, IA_ZAP_OBJ, + IA_WHATIS_OBJ, /* '/' specify inventory object */ }; /* construct text for the menu entries for IA_NAME_OBJ and IA_NAME_OTYP */ @@ -2898,6 +2899,11 @@ itemactions_pushkeys(struct obj *otmp, int act) cmdq_add_ec(CQ_CANNED, dozap); cmdq_add_key(CQ_CANNED, otmp->invlet); break; + case IA_WHATIS_OBJ: + cmdq_add_ec(CQ_CANNED, dowhatis); + cmdq_add_key(CQ_CANNED, 'i'); + cmdq_add_key(CQ_CANNED, otmp->invlet); + break; } } @@ -3186,6 +3192,9 @@ itemactions(struct obj *otmp) if (otmp->oclass == WAND_CLASS) ia_addmenu(win, IA_ZAP_OBJ, 'z', "Zap this wand to release its magic"); + /* ?: Look up an item in the game's database */ + ia_addmenu(win, IA_WHATIS_OBJ, '/', "Look up information about this item"); + Sprintf(buf, "Do what with %s?", the(cxname(otmp))); end_menu(win, buf); diff --git a/src/pager.c b/src/pager.c index b92e76f3c..4611cab1e 100644 --- a/src/pager.c +++ b/src/pager.c @@ -960,7 +960,7 @@ checkfile(char *inp, struct permonst *pm, boolean user_typed_name, destroy_nhwindow(datawin), datawin = WIN_ERR; } } else if (user_typed_name && pass == 0 && !pass1found_in_file) - pline("I don't have any information on those things."); + pline("You don't have any information on those things."); } } goto checkfile_done; /* skip error feedback */ @@ -1450,6 +1450,7 @@ do_look(int mode, coord *click_cc) boolean quick = (mode == 1); /* use cursor; don't search for "more info" */ boolean clicklook = (mode == 2); /* right mouse-click method */ char out_str[BUFSZ] = DUMMY; + struct _cmd_queue cq, *cmdq; const char *firstmatch = 0; struct permonst *pm = 0, *supplemental_pm = 0; int i = '\0', ans = 0; @@ -1463,6 +1464,16 @@ do_look(int mode, coord *click_cc) cc.x = 0; cc.y = 0; + if ((cmdq = cmdq_pop()) != 0) { + cq = *cmdq; + free((genericptr_t) cmdq); + if (cq.typ == CMDQ_KEY) + i = cq.key; + else + cmdq_clear(CQ_CANNED); + goto dowhatiscmd; + } + if (!clicklook) { if (quick) { from_screen = TRUE; /* yes, we want to use the cursor */ @@ -1533,6 +1544,7 @@ do_look(int mode, coord *click_cc) destroy_nhwindow(win); } +dowhatiscmd: switch (i) { default: case 'q': diff --git a/util/tileset.bmp b/util/tileset.bmp new file mode 100644 index 000000000..c5f20fb3b Binary files /dev/null and b/util/tileset.bmp differ