From dec222e0bfd9f0f22dabd2a98b58db8aac8785b5 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Mon, 18 Aug 2025 01:52:17 -0700 Subject: [PATCH] [MIRROR] Crates Handle Directional Lights Better (#11458) Co-authored-by: Will <7099514+Willburd@users.noreply.github.com> --- code/datums/components/overlay_lighting.dm | 2 ++ code/game/objects/structures/crates_lockers/crates.dm | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/datums/components/overlay_lighting.dm b/code/datums/components/overlay_lighting.dm index b0e464482f..3385ae0323 100644 --- a/code/datums/components/overlay_lighting.dm +++ b/code/datums/components/overlay_lighting.dm @@ -245,6 +245,8 @@ /datum/component/overlay_lighting/proc/set_holder(atom/movable/new_holder) if(new_holder == current_holder) return + if(istype(new_holder,/obj/structure/closet)) + new_holder = null // Forbid crates from holding lights, this only applies to contents 'holding', when you put a flashlight into a crate for example. Not crates with lights... Not that there are any. if(current_holder) if(current_holder != parent && current_holder != parent_attached_to) UnregisterSignal(current_holder, list(COMSIG_PARENT_QDELETING, COMSIG_MOVABLE_MOVED, COMSIG_LIGHT_EATER_QUEUE)) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 5c16642200..77a1d30f68 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -58,7 +58,7 @@ for(var/obj/O in get_turf(src)) if(itemcount >= storage_capacity) break - if(O.density || O.anchored || istype(O,/obj/structure/closet)) + if(O.density || O.anchored || istype(O,/obj/structure/closet) || istype(O,/obj/effect/abstract)) continue if(istype(O, /obj/structure/bed)) //This is only necessary because of rollerbeds and swivel chairs. var/obj/structure/bed/B = O