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

Function tin_ok

src/eat.c:3560–3573  ·  view source on GitHub ↗

getobj callback for object to be tinned */

Source from the content-addressed store, hash-verified

3558
3559/* getobj callback for object to be tinned */
3560staticfn int
3561tin_ok(struct obj *obj)
3562{
3563 if (!obj)
3564 return getobj_else ? GETOBJ_EXCLUDE_NONINVENT : GETOBJ_EXCLUDE;
3565
3566 if (obj->oclass != FOOD_CLASS)
3567 return GETOBJ_EXCLUDE;
3568
3569 if (obj->otyp != CORPSE || !tinnable(obj))
3570 return GETOBJ_EXCLUDE_SELECTABLE;
3571
3572 return GETOBJ_SUGGEST;
3573}
3574
3575/* Returns an object representing food.
3576 * Object may be either on floor or in inventory.

Callers

nothing calls this directly

Calls 1

tinnableFunction · 0.85

Tested by

no test coverage detected