From a2479cb48e72021cd58169c3675895d11e577bb9 Mon Sep 17 00:00:00 2001 From: ChungusGamer666 <82850673+ChungusGamer666@users.noreply.github.com> Date: Sat, 31 Dec 2022 06:57:30 -0300 Subject: [PATCH] Static light sources will attempt to follow the top atom (#72148) ## About The Pull Request Fixes https://github.com/tgstation/tgstation/issues/71826 Probably fixes some other issue related to lighting but i didn't find any ## Why It's Good For The Game Look, i know it's called STATIC lighting for a reason, and movement on it should be kept to a minimum, but this at least ensure that static lighting being carried around, if that happens for some reason, updates properly. ## Changelog :cl: fix: Static light sources update properly now when carried by a mob. /:cl: --- code/modules/lighting/lighting_source.dm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/modules/lighting/lighting_source.dm b/code/modules/lighting/lighting_source.dm index 23858096319..44ed0ef569a 100644 --- a/code/modules/lighting/lighting_source.dm +++ b/code/modules/lighting/lighting_source.dm @@ -79,7 +79,8 @@ return FALSE LAZYADD(new_atom_host.light_sources, src) - if(ismovable(new_atom_host) && new_atom_host == source_atom) + //yes, we register the signal to the top atom too, this is intentional and ensures contained lighting updates properly + if(ismovable(new_atom_host)) RegisterSignal(new_atom_host, COMSIG_MOVABLE_MOVED, PROC_REF(update_host_lights)) return TRUE @@ -89,7 +90,7 @@ return FALSE LAZYREMOVE(old_atom_host.light_sources, src) - if(ismovable(old_atom_host) && old_atom_host == source_atom) + if(ismovable(old_atom_host)) UnregisterSignal(old_atom_host, COMSIG_MOVABLE_MOVED) return TRUE