From 60ab145dce68dd319ce722d9ff16d70b45a41321 Mon Sep 17 00:00:00 2001 From: FlufflesTheDog Date: Wed, 5 Jul 2023 18:15:45 -0700 Subject: [PATCH] Fixes the Independent Litieguai organ freezer (#2098) ## About The Pull Request TLDR - The Litieguai's provided organs now decay as you would expect, pausing when in the shut freezer crate. As to the nature of the bug, just in case there's a more generalized solution anyone could suggest: Freezer crates work by toggling the decay state of organs, whenever the crate is opened or closed, as well as when the crate is initialized- in order to freeze any organs that are inside when created. However, currently the organs are just dropped onto the same tile as the crate, and picked up on a 0 second timer (so after the freeze toggle), which leads to the organs having an inverted decay state- only decaying when the box is closed, and stopping their decay when the box is opened and even when picked up or moved to the floor. ## Why It's Good For The Game Fix bugs! Also turn an interesting snowflake crate into a proper subtype, perhaps encouraging it to be used elsewhere. ## Changelog :cl: fix: Independent Litieguai's organ freezer now properly freezes the provided organs /:cl: --------- Co-authored-by: linkylink21 --- .../shiptest/independent_litieguai.dmm | 15 +-------------- .../structures/crates_lockers/crates.dm | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/_maps/shuttles/shiptest/independent_litieguai.dmm b/_maps/shuttles/shiptest/independent_litieguai.dmm index d290a28d565d..0b3d0c54d603 100644 --- a/_maps/shuttles/shiptest/independent_litieguai.dmm +++ b/_maps/shuttles/shiptest/independent_litieguai.dmm @@ -225,21 +225,8 @@ "fn" = ( /obj/machinery/firealarm/directional/west, /obj/machinery/airalarm/directional/south, -/obj/structure/closet/crate/freezer/surplus_limbs{ - name = "organ freezer" - }, -/obj/item/organ/stomach, -/obj/item/organ/stomach, -/obj/item/organ/lungs, -/obj/item/organ/liver, -/obj/item/organ/liver, -/obj/item/organ/eyes, -/obj/item/organ/eyes, -/obj/item/organ/heart, -/obj/item/organ/heart, -/obj/item/organ/ears, -/obj/item/organ/ears, /obj/effect/turf_decal/industrial/hatch/red, +/obj/structure/closet/crate/freezer/surplus_limbs/organs, /turf/open/floor/plasteel/tech/techmaint, /area/ship/medical) "fp" = ( diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 0b63d56546a5..d8f53246fc23 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -175,6 +175,24 @@ new /obj/item/bodypart/leg/left/robot/surplus/vox(src) new /obj/item/bodypart/leg/right/robot/surplus/vox(src) +/obj/structure/closet/crate/freezer/surplus_limbs/organs + name = "organ freezer" + desc = "A crate containing a variety of spare limbs and organs." + +/obj/structure/closet/crate/freezer/surplus_limbs/organs/PopulateContents() + . = ..() + new /obj/item/organ/stomach(src) + new /obj/item/organ/stomach(src) + new /obj/item/organ/lungs(src) + new /obj/item/organ/liver(src) + new /obj/item/organ/liver(src) + new /obj/item/organ/eyes(src) + new /obj/item/organ/eyes(src) + new /obj/item/organ/heart(src) + new /obj/item/organ/heart(src) + new /obj/item/organ/ears(src) + new /obj/item/organ/ears(src) + /obj/structure/closet/crate/radiation desc = "A crate with a radiation sign on it." name = "radiation crate"