Cross-Z Lighting (#2281)

This PR edits the lighting engine's turf selection algorithm to also include turfs below openturf tiles, allowing for cross-Z lighting.

changes:

Lights now will now shine down Z-levels when they light up an open turf.
Commented-out openturf starlight pending making it not pummel SSlighting.
Openspace overlays are now only queued if they are not already in the queue.
Lighting overlays will now also update their associated openturf overlay on update if they have one.
Removed an old unused message from the asteroid generation subsystem.
This commit is contained in:
Lohikar
2017-05-20 06:24:04 -05:00
committed by skull132
parent e912700bc0
commit 58b953a3fc
9 changed files with 70 additions and 68 deletions

View File

@@ -371,6 +371,7 @@
var/Sy = source_turf.y
FOR_DVIEW(T, Ceiling(light_range), source_turf, 0)
check_t:
if (light_angle && check_light_cone(T.x, T.y))
continue
@@ -379,6 +380,11 @@
corners[C] = 0
turfs += T
if (istype(T, /turf/simulated/open) && T:below)
T = T:below // Consider the turf below us as well. (Z-lights)
goto check_t
END_FOR_DVIEW
LAZYINITLIST(affecting_turfs)