diff --git a/code/modules/mob/living/simple_animal/simple_animal_vr.dm b/code/modules/mob/living/simple_animal/simple_animal_vr.dm index bb27160807d..6e00cb9423e 100644 --- a/code/modules/mob/living/simple_animal/simple_animal_vr.dm +++ b/code/modules/mob/living/simple_animal/simple_animal_vr.dm @@ -36,9 +36,7 @@ /mob/living/simple_animal/Destroy() for(var/I in vore_organs) var/datum/belly/B = vore_organs[I] - for(var/mob/living/M in B.internal_contents) // because release_all_contents doesn't release absorbed things - M.absorbed = 0 - B.release_all_contents() // When your stomach is empty + B.release_all_contents(include_absorbed = TRUE) // When your stomach is empty prey_excludes.Cut() . = ..() @@ -129,9 +127,7 @@ /mob/living/simple_animal/death() for(var/I in vore_organs) var/datum/belly/B = vore_organs[I] - for(var/mob/living/M in B.internal_contents) // because release_all_contents doesn't release absorbed things - M.absorbed = 0 - B.release_all_contents() // When your stomach is empty + B.release_all_contents(include_absorbed = TRUE) // When your stomach is empty ..() // then you have my permission to die. // Simple animals have only one belly. This creates it (if it isn't already set up) diff --git a/code/modules/vore/eating/belly_vr.dm b/code/modules/vore/eating/belly_vr.dm index 9e35646eb5b..10014599b62 100644 --- a/code/modules/vore/eating/belly_vr.dm +++ b/code/modules/vore/eating/belly_vr.dm @@ -114,20 +114,22 @@ // Release all contents of this belly into the owning mob's location. // If that location is another mob, contents are transferred into whichever of its bellies the owning mob is in. // Returns the number of mobs so released. -/datum/belly/proc/release_all_contents() +/datum/belly/proc/release_all_contents(var/include_absorbed = FALSE) if (internal_contents.len == 0) return 0 - for (var/atom/movable/M in internal_contents) + for (var/M in internal_contents) if(istype(M,/mob/living)) var/mob/living/ML = M - if(ML.absorbed) + if(ML.absorbed && !include_absorbed) continue + ML.absorbed = FALSE - M.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner. - internal_contents -= M // Remove from the belly contents + var/atom/movable/AM = M + AM.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner. + internal_contents -= AM // Remove from the belly contents var/datum/belly/B = check_belly(owner) // This makes sure that the mob behaves properly if released into another mob if(B) - B.internal_contents += M + B.internal_contents += AM items_preserved.Cut() checked_slots.Cut() owner.visible_message("[owner] expels everything from their [lowertext(name)]!")