mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2025-12-21 15:42:35 +00:00
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:
@@ -6,7 +6,7 @@
|
||||
/datum/controller/subsystem/asteroid/Initialize(timeofday)
|
||||
if(config.generate_asteroid)
|
||||
// These values determine the specific area that the map is applied to.
|
||||
// If you do not use the official Baycode moonbase map, you will need to change them.
|
||||
|
||||
// Create the chasms.
|
||||
new /datum/random_map/automata/cave_system/chasms(null,0,0,3,255,255)
|
||||
new /datum/random_map/automata/cave_system(null,0,0,3,255,255)
|
||||
@@ -15,12 +15,9 @@
|
||||
new /datum/random_map/automata/cave_system/chasms(null,0,0,5,255,255)
|
||||
new /datum/random_map/automata/cave_system/high_yield(null,0,0,5,255,255)
|
||||
new /datum/random_map/automata/cave_system/chasms/surface(null,0,0,6,255,255)
|
||||
|
||||
// Create the deep mining ore distribution map.
|
||||
new /datum/random_map/noise/ore(null, 0, 0, 5, 64, 64)
|
||||
new /datum/random_map/noise/ore(null, 0, 0, 4, 64, 64)
|
||||
new /datum/random_map/noise/ore(null, 0, 0, 3, 64, 64)
|
||||
var/counting_result = "Total number of chasms: [SSopenturf.openspace_turfs.len]"
|
||||
admin_notice(span("danger", counting_result))
|
||||
game_log("ASGEN", counting_result)
|
||||
|
||||
..()
|
||||
|
||||
@@ -97,18 +97,12 @@
|
||||
// Handle space parallax & starlight.
|
||||
if (T.is_above_space())
|
||||
T.plane = PLANE_SPACE_BACKGROUND
|
||||
if (config.starlight)
|
||||
for (var/thing in RANGE_TURFS(1, T))
|
||||
var/turf/RT = thing
|
||||
if (!RT.dynamic_lighting || istype(RT, /turf/simulated/open))
|
||||
continue
|
||||
|
||||
T.set_light(config.starlight, 0.5)
|
||||
break
|
||||
/*if (config.starlight) // Openturf starlight is broken. SSlighting and SSopenturf will fight if this is un-commented-out. Maybe someone will fix it someday.
|
||||
T.set_light(config.starlight, 0.5)*/
|
||||
else
|
||||
T.plane = OPENTURF_MAX_PLANE - depth
|
||||
if (config.starlight && T.light_range != 0)
|
||||
T.set_light(0)
|
||||
/*if (config.starlight && T.light_range != 0)
|
||||
T.set_light(0)*/
|
||||
|
||||
// Add everything below us to the update queue.
|
||||
for (var/thing in T.below)
|
||||
@@ -167,11 +161,10 @@
|
||||
OO.dir = OO.associated_atom.dir
|
||||
OO.appearance = OO.associated_atom
|
||||
OO.plane = OPENTURF_MAX_PLANE - OO.depth
|
||||
OO.queued = FALSE
|
||||
|
||||
// Something's above us, queue it.
|
||||
var/turf/oo_loc = OO.loc
|
||||
if (istype(oo_loc.above))
|
||||
oo_loc.above.update_icon()
|
||||
if (OO.bound_overlay) // If we have a bound overlay, queue it too.
|
||||
OO.update_oo()
|
||||
|
||||
if (no_mc_tick)
|
||||
CHECK_TICK
|
||||
|
||||
Reference in New Issue
Block a user