Starlight Fix (#22929)

* Fix starlight not working on overmap and overship maps.
This commit is contained in:
Geeves
2026-07-26 18:04:12 +00:00
committed by GitHub
parent 0e06a95b2c
commit 80ace1682c
3 changed files with 19 additions and 2 deletions
+3 -2
View File
@@ -56,7 +56,7 @@
return INITIALIZE_HINT_NORMAL
// Handles starlight logic unique to space turfs.
/turf/space/update_starlight()
/turf/space/update_starlight(has_simulated_neighbor = FALSE)
. = ..() // We also run the parent proc here, since space may also require starlight from needs_starlight!
// Our parent proc already handled starlight for us, we don't have to do our own checks
@@ -64,7 +64,8 @@
return
// Otherwise, if a space turf borders a simulated turf, it should be producing starlight.
if(locate(/turf/simulated) in RANGE_TURFS(1, src))
// Some callers already know this and can skip building another range list.
if(has_simulated_neighbor || locate(/turf/simulated) in RANGE_TURFS(1, src))
set_light(SSatlas.current_sector.starlight_range, SSatlas.current_sector.starlight_power, l_color = SSskybox.background_color)
// We don't want this doing anything on space, otherwise update_starlight() would run set_light on space turfs twice.