From 45f63c9cea5d3a290f54b3664cf487f0807f0088 Mon Sep 17 00:00:00 2001 From: Aronai Sieyes Date: Fri, 24 Apr 2020 16:31:40 -0400 Subject: [PATCH] Flip proteans back to protean panel on blob --- .../species/station/protean_vr/protean_blob.dm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm index da27a9aacef..66fd95f226f 100644 --- a/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm +++ b/code/modules/mob/living/carbon/human/species/station/protean_vr/protean_blob.dm @@ -242,6 +242,10 @@ // Helpers - Unsafe, WILL perform change. /mob/living/carbon/human/proc/nano_intoblob() + var/panel_was_up = FALSE + if(client?.statpanel == "Protean") + panel_was_up = TRUE + handle_grasp() //It's possible to blob out before some key parts of the life loop. This results in things getting dropped at null. TODO: Fix the code so this can be done better. remove_micros(src, src) //Living things don't fare well in roblobs. if(buckled) @@ -312,6 +316,10 @@ B.forceMove(blob) B.owner = blob + //Flip them to the protean panel + if(panel_was_up) + client?.statpanel = "Protean" + //Return our blob in case someone wants it return blob @@ -325,6 +333,11 @@ /mob/living/carbon/human/proc/nano_outofblob(var/mob/living/simple_mob/protean_blob/blob) if(!istype(blob)) return + + var/panel_was_up = FALSE + if(client?.statpanel == "Protean") + panel_was_up = TRUE + if(buckled) buckled.unbuckle_mob() if(LAZYLEN(buckled_mobs)) @@ -375,5 +388,9 @@ //Get rid of friend blob qdel(blob) + //Flip them to the protean panel + if(panel_was_up) + client?.statpanel = "Protean" + //Return ourselves in case someone wants it return src