Despawn NIF occupants in cryo

Fixes #2683
This commit is contained in:
Arokha Sieyes
2018-01-08 13:59:52 -05:00
parent 080a9234d6
commit 636f9601b7
2 changed files with 9 additions and 1 deletions

View File

@@ -375,6 +375,13 @@
// VOREStation // VOREStation
hook_vr("despawn", list(to_despawn, src)) 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 // VOREStation
//Drop all items into the pod. //Drop all items into the pod.

View File

@@ -48,7 +48,7 @@
nif.human.verbs |= /mob/living/carbon/human/proc/nme nif.human.verbs |= /mob/living/carbon/human/proc/nme
uninstall() 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/nsay
nif.human.verbs -= /mob/living/carbon/human/proc/nme nif.human.verbs -= /mob/living/carbon/human/proc/nme
@@ -201,6 +201,7 @@
//Put the mind and player into the mob //Put the mind and player into the mob
M.mind.transfer_to(brainmob) M.mind.transfer_to(brainmob)
brainmob.name = brainmob.mind.name brainmob.name = brainmob.mind.name
brainmob.real_name = brainmob.mind.name
//If we caught our owner, special settings. //If we caught our owner, special settings.
if(M == nif.human) if(M == nif.human)