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

🆑
fix: Static light sources update properly now when carried by a mob.
/🆑
This commit is contained in:
ChungusGamer666
2022-12-31 01:57:30 -08:00
committed by GitHub
parent f0db2c203f
commit a2479cb48e
+3 -2
View File
@@ -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