From aee11e857ab4af3790066a025fb8a67a25ad9235 Mon Sep 17 00:00:00 2001 From: Krausus Date: Sat, 16 May 2015 05:20:49 -0400 Subject: [PATCH] Fixes cryopod item preservation runtimes Cryopods attempt to preserve certain important items when despawning their occupants. They also attempt to remove the contents of anything on their occupants. Some preserved items have important contents, which should not be removed, and may cause runtimes after retrieval. This should fix those runtimes. --- code/game/machinery/cryopod.dm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 04d83139453..30db6a7d225 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -307,6 +307,13 @@ W.loc = src if(W.contents.len) //Make sure we catch anything not handled by del() on the items. + var/preserve = null + for(var/T in preserve_items) + if(istype(W,T)) + preserve = 1 + break + if(preserve) // Don't remove the contents of things that need preservation + continue for(var/obj/item/O in W.contents) if(istype(O,/obj/item/weapon/tank)) //Stop eating pockets, you fuck! continue