Various lighting fixes. (#94)
* Various lighting fixes. * Removes debug things. * I forgot to hit crtl+s
This commit is contained in:
committed by
TalkingCactus
parent
8724be8fca
commit
8b762a5317
@@ -18,12 +18,12 @@
|
||||
dynamic_lighting = new_dynamic_lighting
|
||||
|
||||
if (IS_DYNAMIC_LIGHTING(src))
|
||||
for (var/turf/T in (area_contents()))
|
||||
for (var/turf/T in area_contents(src))
|
||||
if (IS_DYNAMIC_LIGHTING(T))
|
||||
T.lighting_build_overlay()
|
||||
|
||||
else
|
||||
for (var/turf/T in (area_contents()))
|
||||
for (var/turf/T in area_contents(src))
|
||||
if (T.lighting_overlay)
|
||||
T.lighting_clear_overlay()
|
||||
|
||||
|
||||
@@ -97,8 +97,6 @@
|
||||
T.reconsider_lights()
|
||||
|
||||
|
||||
// This code makes the light be queued for update when it is moved.
|
||||
// Entered() should handle it, however Exited() can do it if it is being moved to nullspace (as there would be no Entered() call in that situation).
|
||||
/atom/movable/Moved(atom/OldLoc, Dir) //Implemented here because forceMove() doesn't call Move()
|
||||
. = ..()
|
||||
for (var/datum/light_source/L in src.light_sources) // Cycle through the light sources on this atom and tell them to update.
|
||||
|
||||
@@ -33,20 +33,21 @@
|
||||
update_overlay()
|
||||
|
||||
/atom/movable/lighting_overlay/Destroy(var/force)
|
||||
global.all_lighting_overlays -= src
|
||||
global.lighting_update_overlays -= src
|
||||
global.lighting_update_overlays_old -= src
|
||||
|
||||
var/turf/T = loc
|
||||
if (istype(T))
|
||||
T.lighting_overlay = null
|
||||
T.luminosity = 1
|
||||
|
||||
if (force)
|
||||
global.all_lighting_overlays -= src
|
||||
global.lighting_update_overlays -= src
|
||||
global.lighting_update_overlays_old -= src
|
||||
|
||||
var/turf/T = loc
|
||||
if (istype(T))
|
||||
T.lighting_overlay = null
|
||||
T.luminosity = 1
|
||||
|
||||
..()
|
||||
return QDEL_HINT_PUTINPOOL
|
||||
|
||||
else
|
||||
// Fuck you!
|
||||
return QDEL_HINT_LETMELIVE
|
||||
|
||||
/atom/movable/lighting_overlay/proc/update_overlay()
|
||||
@@ -110,3 +111,7 @@
|
||||
color = LIGHTING_BASE_MATRIX
|
||||
|
||||
..("color")
|
||||
|
||||
// Nope nope nope!
|
||||
/atom/movable/lighting_overlay/onShuttleMove(turf/T1, rotation)
|
||||
return FALSE
|
||||
|
||||
@@ -64,9 +64,11 @@
|
||||
if (source_atom)
|
||||
if (source_atom.light == src)
|
||||
source_atom.light = null
|
||||
source_atom.light_sources -= src
|
||||
|
||||
if (top_atom)
|
||||
if (source_atom.light_sources)
|
||||
source_atom.light_sources -= src
|
||||
|
||||
if (top_atom && top_atom.light_sources)
|
||||
top_atom.light_sources -= src
|
||||
|
||||
// Fuck supporting force.
|
||||
|
||||
Reference in New Issue
Block a user