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

Function rub_ok

src/apply.c:1769–1781  ·  view source on GitHub ↗

getobj callback for object to be rubbed - not selecting a secondary object to rub on a gray stone or rub jelly on */

Source from the content-addressed store, hash-verified

1767/* getobj callback for object to be rubbed - not selecting a secondary object
1768 to rub on a gray stone or rub jelly on */
1769staticfn int
1770rub_ok(struct obj *obj)
1771{
1772 if (!obj)
1773 return GETOBJ_EXCLUDE;
1774
1775 if (obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP
1776 || obj->otyp == BRASS_LANTERN || is_graystone(obj)
1777 || obj->otyp == LUMP_OF_ROYAL_JELLY)
1778 return GETOBJ_SUGGEST;
1779
1780 return GETOBJ_EXCLUDE;
1781}
1782
1783/* the #rub command */
1784int

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected