From 636f9601b765b4759d7488f605ec0551566344cc Mon Sep 17 00:00:00 2001 From: Arokha Sieyes Date: Mon, 8 Jan 2018 13:59:52 -0500 Subject: [PATCH] Despawn NIF occupants in cryo Fixes #2683 --- code/game/machinery/cryopod.dm | 7 +++++++ code/modules/nifsoft/software/13_soulcatcher.dm | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 473430c74c..84c111ca81 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -375,6 +375,13 @@ // VOREStation hook_vr("despawn", list(to_despawn, src)) + if(ishuman(to_despawn)) + var/mob/living/carbon/human/H = to_despawn + if(H.nif) + var/datum/nifsoft/soulcatcher/SC = H.nif.imp_check(NIF_SOULCATCHER) + if(SC) + for(var/bm in SC.brainmobs) + despawn_occupant(bm) // VOREStation //Drop all items into the pod. diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index 31cd189b5c..7dbf0f9d5f 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -48,7 +48,7 @@ nif.human.verbs |= /mob/living/carbon/human/proc/nme uninstall() - if((. = ..())) + if((. = ..()) && nif && nif.human) //Sometimes NIFs are deleted outside of a human nif.human.verbs -= /mob/living/carbon/human/proc/nsay nif.human.verbs -= /mob/living/carbon/human/proc/nme @@ -201,6 +201,7 @@ //Put the mind and player into the mob M.mind.transfer_to(brainmob) brainmob.name = brainmob.mind.name + brainmob.real_name = brainmob.mind.name //If we caught our owner, special settings. if(M == nif.human)