MCPcopy Create free account
hub / github.com/NetHack/NetHack / find_tool

Function find_tool

win/Qt/qt_inv.cpp:38–50  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36namespace nethack_qt_ {
37
38static struct obj *
39find_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
52NetHackQtInvUsageWindow::NetHackQtInvUsageWindow(QWidget *parent) :
53 QWidget(parent)

Callers 1

paintEventMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected