Fixes PAI deleting devoured things

PAI now "vomits" contents before dying or being deleted.
This commit is contained in:
KeenShayne
2021-08-20 03:44:45 -04:00
parent 6c511626fc
commit ec50ff35f0
2 changed files with 7 additions and 2 deletions
@@ -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
@@ -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 ..()