From 1b9dc284ec88b1d255590d7c38c1a0ba232cf08c Mon Sep 17 00:00:00 2001 From: LiberatedWaveMan Date: Wed, 14 Jul 2021 22:41:40 -0400 Subject: [PATCH 1/9] Cryopod-Preserve-Update Adds new items to the cryo pod's "preserve" list --- code/game/machinery/cryopod.dm | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index a67f068912f..30741021517 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -254,6 +254,10 @@ /obj/item/door_remote, /obj/item/autopsy_scanner, /obj/item/holosign_creator/atmos + /obj/item/clothing/gloves/color/black/forensics + /obj/item/rcd + /obj/item/rpd + /obj/item/gun/projectile/revolver/detective ) // These items will NOT be preserved var/list/do_not_preserve_items = list ( From ed94521ca1d64896d72477c1082eb8a05ce0d3bf Mon Sep 17 00:00:00 2001 From: LiberatedWaveMan Date: Wed, 14 Jul 2021 22:47:45 -0400 Subject: [PATCH 2/9] Update cryopod.dm --- code/game/machinery/cryopod.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 30741021517..660b1d9ad0f 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -257,7 +257,7 @@ /obj/item/clothing/gloves/color/black/forensics /obj/item/rcd /obj/item/rpd - /obj/item/gun/projectile/revolver/detective + /obj/item/gun/projectile/revolver/detective, ) // These items will NOT be preserved var/list/do_not_preserve_items = list ( From 45c574c510db0284d143c48c9fd14a4bcb028dac Mon Sep 17 00:00:00 2001 From: LiberatedWaveMan Date: Wed, 14 Jul 2021 22:51:06 -0400 Subject: [PATCH 3/9] Update cryopod.dm --- code/game/machinery/cryopod.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 660b1d9ad0f..30741021517 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -257,7 +257,7 @@ /obj/item/clothing/gloves/color/black/forensics /obj/item/rcd /obj/item/rpd - /obj/item/gun/projectile/revolver/detective, + /obj/item/gun/projectile/revolver/detective ) // These items will NOT be preserved var/list/do_not_preserve_items = list ( From 2840d12552def69d5df23ae8c5aa4845ff20fa87 Mon Sep 17 00:00:00 2001 From: LiberatedWaveMan Date: Wed, 14 Jul 2021 23:01:02 -0400 Subject: [PATCH 4/9] Fixes entries, adds commas --- code/game/machinery/cryopod.dm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 30741021517..dfd2b2531cc 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -253,10 +253,10 @@ /obj/item/key, /obj/item/door_remote, /obj/item/autopsy_scanner, - /obj/item/holosign_creator/atmos - /obj/item/clothing/gloves/color/black/forensics - /obj/item/rcd - /obj/item/rpd + /obj/item/holosign_creator/atmos, + /obj/item/clothing/gloves/color/black/forensics, + /obj/item/rcd, + /obj/item/rpd, /obj/item/gun/projectile/revolver/detective ) // These items will NOT be preserved From 506fb0a75a22069d941e5a1947b9453aeb20140e Mon Sep 17 00:00:00 2001 From: LiberatedWaveMan <81937308+LiberatedWaveMan@users.noreply.github.com> Date: Wed, 14 Jul 2021 23:49:23 -0400 Subject: [PATCH 5/9] Adds shoulder holster Revolver can still be lost to cryo if stored in the shoulder holster; recovering the shoulder holster as well will prevent this --- code/game/machinery/cryopod.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index dfd2b2531cc..409139e1826 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -257,7 +257,8 @@ /obj/item/clothing/gloves/color/black/forensics, /obj/item/rcd, /obj/item/rpd, - /obj/item/gun/projectile/revolver/detective + /obj/item/gun/projectile/revolver/detective, + /obj/item/clothing/accessory/holster/armpit ) // These items will NOT be preserved var/list/do_not_preserve_items = list ( From 9e8f5eb00af9f182b7ea795299e17af512ee02bf Mon Sep 17 00:00:00 2001 From: Mieszko Jedrzejczak Date: Fri, 16 Jul 2021 15:09:18 +0200 Subject: [PATCH 6/9] fix cryo contents logic --- code/game/machinery/cryopod.dm | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 409139e1826..cfc191e5eca 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -346,21 +346,23 @@ return CRYO_PRESERVE return CRYO_DESTROY -// This function can not be undone; do not call this unless you are sure -// Also make sure there is a valid control computer + +/obj/machinery/cryopod/proc/handle_contents(obj/item/I) + if(I.contents.len) //Make sure we catch anything not handled by qdel() on the items. + if(should_preserve_item(I) != CRYO_DESTROY) // Don't remove the contents of things that need preservation + return + for(var/obj/item/O in I.contents) + if(istype(O, /obj/item/tank)) //Stop eating pockets, you fuck! + continue + handle_contents(O) + O.forceMove(src) + /obj/machinery/cryopod/proc/despawn_occupant() //Drop all items into the pod. for(var/obj/item/I in occupant) occupant.unEquip(I) I.forceMove(src) - - if(I.contents.len) //Make sure we catch anything not handled by qdel() on the items. - if(should_preserve_item(I) != CRYO_DESTROY) // Don't remove the contents of things that need preservation - continue - for(var/obj/item/O in I.contents) - if(istype(O, /obj/item/tank)) //Stop eating pockets, you fuck! - continue - O.forceMove(src) + handle_contents(I) for(var/obj/machinery/computer/cloning/cloner in GLOB.machines) for(var/datum/dna2/record/R in cloner.records) From 725127729177c2e101a103125d83b73958608cb9 Mon Sep 17 00:00:00 2001 From: LiberatedWaveMan <81937308+LiberatedWaveMan@users.noreply.github.com> Date: Fri, 16 Jul 2021 09:12:56 -0400 Subject: [PATCH 7/9] Removes shoulder holster and detective's revolver Apparently these aren't necessary, so I'm removing them --- code/game/machinery/cryopod.dm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index cfc191e5eca..6558f10a1de 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -256,9 +256,7 @@ /obj/item/holosign_creator/atmos, /obj/item/clothing/gloves/color/black/forensics, /obj/item/rcd, - /obj/item/rpd, - /obj/item/gun/projectile/revolver/detective, - /obj/item/clothing/accessory/holster/armpit + /obj/item/rpd ) // These items will NOT be preserved var/list/do_not_preserve_items = list ( From 9d62303eb4c3e4e0709dc65a59f6febd29f722f1 Mon Sep 17 00:00:00 2001 From: LiberatedWaveMan <81937308+LiberatedWaveMan@users.noreply.github.com> Date: Mon, 26 Jul 2021 15:23:32 -0400 Subject: [PATCH 8/9] Changes I.contents.len to (length(I,contents)) I have no idea what this does, but the suggestion came from AA so.. Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> --- code/game/machinery/cryopod.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 6558f10a1de..689cba6a5f0 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -346,7 +346,7 @@ /obj/machinery/cryopod/proc/handle_contents(obj/item/I) - if(I.contents.len) //Make sure we catch anything not handled by qdel() on the items. + if(length(I.contents)) //Make sure we catch anything not handled by qdel() on the items. if(should_preserve_item(I) != CRYO_DESTROY) // Don't remove the contents of things that need preservation return for(var/obj/item/O in I.contents) From e9c0a7ddb9c3fdd025e46cee323b1339b52a9a48 Mon Sep 17 00:00:00 2001 From: LiberatedWaveMan Date: Mon, 26 Jul 2021 15:37:41 -0400 Subject: [PATCH 9/9] Fixes Holster Logic Apparently if a gun is holstered, cryo just automatically deletes it- this should fix that according to Sabre --- code/modules/clothing/under/accessories/holster.dm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/modules/clothing/under/accessories/holster.dm b/code/modules/clothing/under/accessories/holster.dm index c06f2285a7c..e317fbf242b 100644 --- a/code/modules/clothing/under/accessories/holster.dm +++ b/code/modules/clothing/under/accessories/holster.dm @@ -10,7 +10,9 @@ w_class = WEIGHT_CLASS_NORMAL // so it doesn't fit in pockets /obj/item/clothing/accessory/holster/Destroy() - QDEL_NULL(holstered) + if(holstered?.loc == src) // Gun still in the holster + holstered.forceMove(loc) + holstered = null return ..() //subtypes can override this to specify what can be holstered