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

Function dip_ok

src/potion.c:2213–2227  ·  view source on GitHub ↗

getobj callback for object to be dipped (not the thing being dipped into, * that uses drink_ok) */

Source from the content-addressed store, hash-verified

2211/* getobj callback for object to be dipped (not the thing being dipped into,
2212 * that uses drink_ok) */
2213staticfn int
2214dip_ok(struct obj *obj)
2215{
2216 if (!obj)
2217 return GETOBJ_DOWNPLAY;
2218
2219 /* dipping gold isn't currently implemented */
2220 if (obj->oclass == COIN_CLASS)
2221 return GETOBJ_EXCLUDE;
2222
2223 if (inaccessible_equipment(obj, (const char *) 0, FALSE))
2224 return GETOBJ_EXCLUDE_INACCESS;
2225
2226 return GETOBJ_SUGGEST;
2227}
2228
2229/* getobj callback for object to be dipped when hero has slippery hands */
2230staticfn int

Callers 1

dip_hands_okFunction · 0.85

Calls 1

inaccessible_equipmentFunction · 0.85

Tested by

no test coverage detected