diff --git a/code/datums/components/food/edible.dm b/code/datums/components/food/edible.dm index 3b2f39c8b37..54308cf3c5f 100644 --- a/code/datums/components/food/edible.dm +++ b/code/datums/components/food/edible.dm @@ -442,6 +442,13 @@ Behavior that's still missing from this component that original food items had t if(after_eat) after_eat.Invoke(eater, feeder, bitecount) + //Invoke the eater's stomach's after_eat callback if valid + if(iscarbon(eater)) + var/mob/living/carbon/carbon_eater = eater + var/obj/item/organ/internal/stomach/stomach = carbon_eater.getorganslot(ORGAN_SLOT_STOMACH) + if(istype(stomach)) + stomach.after_eat(owner) + return TRUE ///Checks whether or not the eater can actually consume the food diff --git a/code/game/objects/effects/decals/cleanable/misc.dm b/code/game/objects/effects/decals/cleanable/misc.dm index 299e9cbbc37..603e2834f23 100644 --- a/code/game/objects/effects/decals/cleanable/misc.dm +++ b/code/game/objects/effects/decals/cleanable/misc.dm @@ -156,14 +156,7 @@ if(isflyperson(H)) playsound(get_turf(src), 'sound/items/drink.ogg', 50, TRUE) //slurp H.visible_message(span_alert("[H] extends a small proboscis into the vomit pool, sucking it with a slurping sound.")) - if(reagents) - for(var/datum/reagent/R in reagents.reagent_list) - if (istype(R, /datum/reagent/consumable)) - var/datum/reagent/consumable/nutri_check = R - if(nutri_check.nutriment_factor >0) - H.adjust_nutrition(nutri_check.nutriment_factor * nutri_check.volume) - reagents.remove_reagent(nutri_check.type,nutri_check.volume) - reagents.trans_to(H, reagents.total_volume, transfered_by = user) + reagents.trans_to(H, reagents.total_volume, transfered_by = user, methods = INGEST) qdel(src) /obj/effect/decal/cleanable/vomit/old diff --git a/code/modules/mob/living/carbon/human/species_types/flypeople.dm b/code/modules/mob/living/carbon/human/species_types/flypeople.dm index 6c6b2e5944b..0f0bb8db4a0 100644 --- a/code/modules/mob/living/carbon/human/species_types/flypeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/flypeople.dm @@ -138,14 +138,16 @@ name = odd_organ_name() icon_state = pick("brain-x-d", "liver-x", "kidneys-x", "spinner-x", "lungs-x", "random_fly_1", "random_fly_2", "random_fly_3", "random_fly_4", "random_fly_5") -/obj/item/organ/internal/stomach/fly/on_life(delta_time, times_fired) - if(locate(/datum/reagent/consumable) in reagents.reagent_list) - var/mob/living/carbon/body = owner - // we do not loss any nutrition as a fly when vomiting out food - body.vomit(0, FALSE, FALSE, 2, TRUE, force=TRUE, purge_ratio = 0.67) - playsound(get_turf(owner), 'sound/effects/splat.ogg', 50, TRUE) - body.visible_message(span_danger("[body] vomits on the floor!"), \ - span_userdanger("You throw up on the floor!")) +/obj/item/organ/internal/stomach/fly/after_eat(edible) + var/mob/living/carbon/body = owner + ASSERT(istype(body)) + // we do not lose any nutrition as a fly when vomiting out food + body.vomit(lost_nutrition = 0, stun = FALSE, distance = 2, force = TRUE, purge_ratio = 0.67) + playsound(get_turf(owner), 'sound/effects/splat.ogg', 50, TRUE) + body.visible_message( + span_danger("[body] vomits on the floor!"), + span_userdanger("You throw up on the floor!"), + ) return ..() /obj/item/organ/internal/appendix/fly diff --git a/code/modules/surgery/organs/stomach/_stomach.dm b/code/modules/surgery/organs/stomach/_stomach.dm index 2f5f526cc54..fd02656ce97 100644 --- a/code/modules/surgery/organs/stomach/_stomach.dm +++ b/code/modules/surgery/organs/stomach/_stomach.dm @@ -208,6 +208,10 @@ /obj/item/organ/internal/stomach/get_availability(datum/species/owner_species) return !(NOSTOMACH in owner_species.species_traits) +///This gets called after the owner takes a bite of food +/obj/item/organ/internal/stomach/proc/after_eat(atom/edible) + return + /obj/item/organ/internal/stomach/proc/handle_disgust(mob/living/carbon/human/disgusted, delta_time, times_fired) var/old_disgust = disgusted.old_disgust var/disgust = disgusted.disgust