Skip to content

Commit

Permalink
[MIRROR] Fixes a hard del in overlay lighting, fixes inconsistent lig…
Browse files Browse the repository at this point in the history
…ht overlays [MDB IGNORE] (#842)

* Fixes a hard del in overlay lighting, fixes inconsistent light overlays (#79939)

---------

Co-authored-by: SkyratBot <[email protected]>
Co-authored-by: Bloop <[email protected]>
  • Loading branch information
3 people authored Nov 27, 2023
1 parent 2d89256 commit 07ed061
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion code/datums/components/overlay_lighting.dm
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,9 @@
///Used to determine the new valid current_holder from the parent's loc.
/datum/component/overlay_lighting/proc/check_holder()
var/atom/movable/movable_parent = GET_PARENT
if(QDELETED(movable_parent))
set_holder(null)
return
if(isturf(movable_parent.loc))
set_holder(movable_parent)
return
Expand All @@ -274,7 +277,11 @@
set_holder(null)
return
if(isturf(inside.loc))
set_holder(inside)
// storage items block light, also don't be moving into a qdeleted item
if(QDELETED(inside) || istype(inside, /obj/item/storage))
set_holder(null)
else
set_holder(inside)
return
set_holder(null)

Expand All @@ -283,6 +290,7 @@
/datum/component/overlay_lighting/proc/on_holder_qdel(atom/movable/source, force)
SIGNAL_HANDLER
if(QDELETED(current_holder))
set_holder(null)
return
UnregisterSignal(current_holder, list(COMSIG_QDELETING, COMSIG_MOVABLE_MOVED))
if(directional)
Expand Down

0 comments on commit 07ed061

Please sign in to comment.