From a8a495c0acade759e6e90ac1a6136ce254c3e9d0 Mon Sep 17 00:00:00 2001 From: Timothy Teakettle <59849408+timothyteakettle@users.noreply.github.com> Date: Thu, 16 Jul 2020 18:22:58 +0100 Subject: [PATCH] rewrites pickle handling --- code/modules/mob/living/simple_animal/pickle.dm | 9 ++++----- code/modules/mob/transform_procs.dm | 8 +++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/simple_animal/pickle.dm b/code/modules/mob/living/simple_animal/pickle.dm index 09365fa7e2..a9052cd789 100644 --- a/code/modules/mob/living/simple_animal/pickle.dm +++ b/code/modules/mob/living/simple_animal/pickle.dm @@ -7,10 +7,10 @@ maxHealth = 100 icon = 'icons/mob/32x64.dmi' icon_state = "pickle" - del_on_death = TRUE deathmessage = "The pickle implodes into its own existential dread and disappears!" friendly_verb_continuous = "tickles" friendly_verb_simple = "tickle" + del_on_death = TRUE var/mob/living/original_body /mob/living/simple_animal/pickle/UnarmedAttack(atom/A) @@ -19,11 +19,10 @@ var/mob/laugher = A laugher.emote("laugh") -/mob/living/simple_animal/pickle/Destroy(force, kill_body = TRUE) +/mob/living/simple_animal/pickle/death() + ..() if(original_body) - if(kill_body) - original_body.adjustOrganLoss(ORGAN_SLOT_BRAIN, 200) //to be fair, you have to have a very high iq to understand- + original_body.adjustOrganLoss(ORGAN_SLOT_BRAIN, 200) //to be fair, you have to have a very high iq to understand- original_body.forceMove(get_turf(src)) if(mind) mind.transfer_to(original_body) - ..() diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 8f86f8edc4..608574a9d0 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -585,7 +585,13 @@ /mob/living/proc/turn_into_pickle() //if they're already a pickle, turn them back instead if(istype(src, /mob/living/simple_animal/pickle)) - qdel(src, FALSE) //this means the body inside the pickle will be dropped without killing it + //turn them back from being a pickle, but release them alive + var/mob/living/simple_animal/pickle/existing_pickle = src + if(existing_pickle.original_body) + existing_pickle.original_body.forceMove(get_turf(src)) + if(mind) + mind.transfer_to(existing_pickle.original_body) + qdel(src) else //make a new pickle on the tile and move their mind into it if possible var/mob/living/simple_animal/pickle/new_pickle = new /mob/living/simple_animal/pickle(get_turf(src))