From ec50ff35f00f8b9243bb54b8af2446a90b59eca9 Mon Sep 17 00:00:00 2001 From: KeenShayne Date: Fri, 20 Aug 2021 03:44:45 -0400 Subject: [PATCH] Fixes PAI deleting devoured things PAI now "vomits" contents before dying or being deleted. --- code/modules/mob/living/silicon/pai/death.dm | 1 + code/modules/mob/living/silicon/pai/pai_vr.dm | 8 ++++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/pai/death.dm b/code/modules/mob/living/silicon/pai/death.dm index 01650cc4b28..4989cecacec 100644 --- a/code/modules/mob/living/silicon/pai/death.dm +++ b/code/modules/mob/living/silicon/pai/death.dm @@ -1,4 +1,5 @@ /mob/living/silicon/pai/death(gibbed) + release_vore_contents() if(card) card.removePersonality() //if(gibbed) //VOREStation Edit Start. This prevents pAIs from joining back into their card after the card's killed diff --git a/code/modules/mob/living/silicon/pai/pai_vr.dm b/code/modules/mob/living/silicon/pai/pai_vr.dm index c8ab1d7e076..d5f989b67e0 100644 --- a/code/modules/mob/living/silicon/pai/pai_vr.dm +++ b/code/modules/mob/living/silicon/pai/pai_vr.dm @@ -25,12 +25,12 @@ /mob/living/silicon/pai/update_icon() //Some functions cause this to occur, such as resting ..() update_fullness_pai() - + if(!people_eaten && !resting) icon_state = "[chassis]" //Using icon_state here resulted in quite a few bugs. Chassis is much less buggy. else if(!people_eaten && resting) icon_state = "[chassis]_rest" - + // Unfortunately not all these states exist, ugh. else if(people_eaten && !resting) if("[chassis]_full" in cached_icon_states(icon)) @@ -81,3 +81,7 @@ chassis = possible_chassis[choice] verbs |= /mob/living/proc/hide update_icon() +// Release belly contents before being gc'd! +/mob/living/silicon/pai/Destroy() + release_vore_contents() + return ..() \ No newline at end of file