mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
fixes #10232
makes lights trigger on forceMove using a vg change Signed-off-by: Mloc <colmohici@gmail.com>
This commit is contained in:
@@ -46,21 +46,13 @@
|
||||
T.reconsider_lights()
|
||||
return ..()
|
||||
|
||||
/atom/movable/Move()
|
||||
var/turf/old_loc = loc
|
||||
/atom/Entered(atom/movable/obj, atom/prev_loc)
|
||||
. = ..()
|
||||
|
||||
if(loc != old_loc)
|
||||
for(var/datum/light_source/L in light_sources)
|
||||
if(obj && prev_loc != src)
|
||||
for(var/datum/light_source/L in obj.light_sources)
|
||||
L.source_atom.update_light()
|
||||
|
||||
var/turf/new_loc = loc
|
||||
if(istype(old_loc) && opacity)
|
||||
old_loc.reconsider_lights()
|
||||
|
||||
if(istype(new_loc) && opacity)
|
||||
new_loc.reconsider_lights()
|
||||
|
||||
/atom/proc/set_opacity(new_opacity)
|
||||
var/old_opacity = opacity
|
||||
opacity = new_opacity
|
||||
|
||||
@@ -98,3 +98,5 @@
|
||||
var/turf/T = loc
|
||||
if(istype(T))
|
||||
T.lighting_overlay = null
|
||||
|
||||
..()
|
||||
|
||||
@@ -16,3 +16,13 @@
|
||||
if(A.lighting_use_dynamic)
|
||||
var/atom/movable/lighting_overlay/O = PoolOrNew(/atom/movable/lighting_overlay, src)
|
||||
lighting_overlay = O
|
||||
|
||||
/turf/Entered(atom/movable/obj)
|
||||
. = ..()
|
||||
if(obj && obj.opacity)
|
||||
reconsider_lights()
|
||||
|
||||
/turf/Exited(atom/movable/obj)
|
||||
. = ..()
|
||||
if(obj && obj.opacity)
|
||||
reconsider_lights()
|
||||
|
||||
Reference in New Issue
Block a user