getobj callback for object to be tinned */
| 3558 | |
| 3559 | /* getobj callback for object to be tinned */ |
| 3560 | staticfn int |
| 3561 | tin_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. |
nothing calls this directly
no test coverage detected