| 36 | namespace nethack_qt_ { |
| 37 | |
| 38 | static struct obj * |
| 39 | find_tool(int tooltyp) |
| 40 | { |
| 41 | struct obj *o; |
| 42 | |
| 43 | for (o = gi.invent; o; o = o->nobj) { |
| 44 | if ((tooltyp == LEASH && o->otyp == LEASH && o->leashmon) |
| 45 | // OIL_LAMP is used for candles, lamps, lantern, candelabrum too |
| 46 | || (tooltyp == OIL_LAMP && o->lamplit)) |
| 47 | break; |
| 48 | } |
| 49 | return o; |
| 50 | } |
| 51 | |
| 52 | NetHackQtInvUsageWindow::NetHackQtInvUsageWindow(QWidget *parent) : |
| 53 | QWidget(parent) |