getobj callback for object to be offered (corpses and things that look like * the Amulet only */
| 3536 | /* getobj callback for object to be offered (corpses and things that look like |
| 3537 | * the Amulet only */ |
| 3538 | staticfn int |
| 3539 | offer_ok(struct obj *obj) |
| 3540 | { |
| 3541 | if (!obj) |
| 3542 | return getobj_else ? GETOBJ_EXCLUDE_NONINVENT : GETOBJ_EXCLUDE; |
| 3543 | |
| 3544 | if (obj->oclass != FOOD_CLASS && obj->oclass != AMULET_CLASS) |
| 3545 | return GETOBJ_EXCLUDE; |
| 3546 | |
| 3547 | if (obj->otyp != CORPSE && obj->otyp != AMULET_OF_YENDOR |
| 3548 | && obj->otyp != FAKE_AMULET_OF_YENDOR) |
| 3549 | return GETOBJ_EXCLUDE_SELECTABLE; |
| 3550 | |
| 3551 | /* suppress corpses on astral, amulets elsewhere |
| 3552 | * (!astral && amulet) || (astral && !amulet) */ |
| 3553 | if (Is_astralevel(&u.uz) ^ (obj->oclass == AMULET_CLASS)) |
| 3554 | return GETOBJ_DOWNPLAY; |
| 3555 | |
| 3556 | return GETOBJ_SUGGEST; |
| 3557 | } |
| 3558 | |
| 3559 | /* getobj callback for object to be tinned */ |
| 3560 | staticfn int |
nothing calls this directly
no outgoing calls
no test coverage detected