mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-22 20:43:10 +01:00
Queue starlight, optimize exoplanet gen, fix ruin generation (#14524)
This commit is contained in:
@@ -25,9 +25,9 @@
|
||||
#define SS_INIT_SUNLIGHT 1 // Sunlight setup. Creates lots of lighting & SSzcopy updates.
|
||||
#define SS_INIT_LIGHTING 0 // Generation of lighting overlays and pre-bake. May cause openturf updates, should initialize before SSzcopy.
|
||||
#define SS_INIT_ZCOPY -1 // Z-mimic flush. Should run after SSoverlay & SSicon_smooth so it copies the smoothed sprites.
|
||||
#define SS_INIT_LOBBY -2 // Lobby timer starts here. The lobby timer won't actually start going down until the MC starts ticking, so you probably want this last
|
||||
#define SS_INIT_CHAT -3 // To ensure chat remains smooth during init.
|
||||
#define SS_INIT_XENOARCH -4 // Xenoarch is this far below because it can infinite loop if placed in SS_INIT_MISC as it was before, due to some subsystems spawning stuff there.
|
||||
#define SS_INIT_XENOARCH -2 // Xenoarch is this far below because it can infinite loop if placed in SS_INIT_MISC as it was before, due to some subsystems spawning stuff there.
|
||||
#define SS_INIT_LOBBY -3 // Lobby timer starts here. The lobby timer won't actually start going down until the MC starts ticking, so you probably want this last
|
||||
#define SS_INIT_CHAT -4 // To ensure chat remains smooth during init.
|
||||
|
||||
// Something to remember when setting priorities: SS_TICKER runs before Normal, which runs before SS_BACKGROUND.
|
||||
// Each group has its own priority bracket.
|
||||
|
||||
@@ -76,6 +76,11 @@ var/datum/controller/subsystem/lighting/SSlighting
|
||||
for (var/zlevel = 1 to world.maxz)
|
||||
for (thing in Z_ALL_TURFS(zlevel))
|
||||
T = thing
|
||||
if(config.starlight)
|
||||
var/turf/space/S = T
|
||||
if(istype(S) && S.use_starlight)
|
||||
S.update_starlight()
|
||||
|
||||
if (!T.dynamic_lighting)
|
||||
continue
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
var/prefix = null
|
||||
var/suffix = null
|
||||
template_flags = 0 // No duplicates by default
|
||||
template_flags = TEMPLATE_FLAG_NO_RUINS // Don't let ruins spawn on top of ruins
|
||||
|
||||
// !! Currently only implemented for away sites
|
||||
var/list/force_ruins // Listed ruins are always spawned unless disallowed by flags.
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
/turf/space/Initialize()
|
||||
if(use_space_appearance)
|
||||
appearance = SSskybox.space_appearance_cache[(((x + y) ^ ~(x * y) + z) % 25) + 1]
|
||||
if(config.starlight && use_starlight)
|
||||
if(config.starlight && use_starlight && lighting_overlays_initialized)
|
||||
update_starlight()
|
||||
|
||||
if (initialized)
|
||||
@@ -62,12 +62,10 @@
|
||||
|
||||
return 0
|
||||
|
||||
/turf/space/proc/update_starlight(var/validate = TRUE)
|
||||
/turf/space/proc/update_starlight()
|
||||
if(!config.starlight)
|
||||
return
|
||||
if(!validate) // basically a hack for places where the check was already done for us
|
||||
set_light(1, config.starlight, l_color = SSskybox.background_color)
|
||||
else if(locate(/turf/simulated) in RANGE_TURFS(1, src))
|
||||
if(locate(/turf/simulated) in RANGE_TURFS(1, src))
|
||||
set_light(1, config.starlight, l_color = SSskybox.background_color)
|
||||
else
|
||||
set_light(0)
|
||||
|
||||
@@ -83,9 +83,9 @@
|
||||
else
|
||||
lighting_clear_overlay()
|
||||
|
||||
if (config.starlight)
|
||||
for (var/turf/space/S in RANGE_TURFS(1, src))
|
||||
S.update_starlight(FALSE)
|
||||
if (config.starlight)
|
||||
for (var/turf/space/S in RANGE_TURFS(1, src))
|
||||
S.update_starlight()
|
||||
|
||||
W.above = old_above
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ var/global/list/map_count = list()
|
||||
if(tlx) limit_x = tlx
|
||||
if(tly) limit_y = tly
|
||||
|
||||
if(used_area)
|
||||
if(!use_area && used_area)
|
||||
if(ispath(used_area))
|
||||
use_area = new(used_area)
|
||||
else
|
||||
@@ -186,7 +186,7 @@ var/global/list/map_count = list()
|
||||
if(!T || (target_turf_type && !istype(T,target_turf_type)))
|
||||
return 0
|
||||
var/newpath = get_appropriate_path(map[tmp_cell])
|
||||
if(newpath)
|
||||
if(newpath && !istype(T, newpath))
|
||||
T.ChangeTurf(newpath)
|
||||
if(spawn_roof)
|
||||
T.spawn_roof()
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
author: JohnWildkins
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- bugfix: "Ruins should no longer generate on top of each other."
|
||||
- backend: "Starlight generation is now handled in SSlighting, so temporary space tiles are not calculated."
|
||||
- backend: "Fixed an issue where exoplanets were creating 2x as many necessary space tiles during generation."
|
||||
- backend: "Moved SSxenoarch init above SSlobby."
|
||||
@@ -126,7 +126,3 @@
|
||||
allow_borgs_to_leave = TRUE
|
||||
|
||||
warehouse_basearea = /area/operations/storage
|
||||
|
||||
/datum/map/sccv_horizon/finalize_load()
|
||||
// generate an empty space Z
|
||||
world.maxz++
|
||||
|
||||
Reference in New Issue
Block a user