From 3747b607965299c678b09fa1bcaabdb9a681db24 Mon Sep 17 00:00:00 2001 From: Rykka Date: Sat, 26 Mar 2022 21:56:06 -0600 Subject: [PATCH] Port upstream brain fix https://github.com/VOREStation/VOREStation/pull/12537 Fix Port 3 --- code/modules/resleeving/autoresleever.dm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/code/modules/resleeving/autoresleever.dm b/code/modules/resleeving/autoresleever.dm index cbb9b0818f..a90daf1c30 100644 --- a/code/modules/resleeving/autoresleever.dm +++ b/code/modules/resleeving/autoresleever.dm @@ -65,8 +65,14 @@ return if(ghost.mind && ghost.mind.current && ghost.mind.current.stat != DEAD) - to_chat(ghost, "Your body is still alive, you cannot be resleeved.") - return + if(istype(ghost.mind.current.loc, /obj/item/device/mmi)) + if(tgui_alert(ghost, "Your brain is still alive, using the auto-resleever will delete that brain. Are you sure?", "Delete Brain", list("No","Yes")) != "Yes") + return + if(istype(ghost.mind.current.loc, /obj/item/device/mmi)) + qdel(ghost.mind.current.loc) + else + to_chat(ghost, "Your body is still alive, you cannot be resleeved.") + return var/client/ghost_client = ghost.client