rewrites pickle handling

This commit is contained in:
Timothy Teakettle
2020-07-16 18:22:58 +01:00
parent d9ceab6553
commit a8a495c0ac
2 changed files with 11 additions and 6 deletions
+7 -1
View File
@@ -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))