mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
Replaces set_light with direct update_lumcount for planet suns.
Setting lights on every single turf takes way too long. Instead of havingto create a light source for every single outdoor turf, we find the corners to light up and apply the sunlight to them directly. We also make sure to avoid having planet sunlight being 4x too strong, which would happen if we naively looped over all corners of all outdoor turfs. Note: This has the side effect of making the sun's light and color ACCURATELY reflected on turfs. Previous code doubled up on light and appeared brighter than it should.
This commit is contained in:
@@ -12,7 +12,8 @@
|
||||
var/datum/weather_holder/weather_holder
|
||||
|
||||
var/sun_position = 0 // 0 means midnight, 1 means noon.
|
||||
var/list/sun = list("range","brightness","color")
|
||||
var/list/sun = list("range","brightness","color","lum_r","lum_g","lum_b")
|
||||
var/list/datum/lighting_corner/sunlit_corners = list()
|
||||
var/expected_z_levels = list()
|
||||
|
||||
var/turf/unsimulated/wall/planetary/planetary_wall_type = /turf/unsimulated/wall/planetary
|
||||
|
||||
Reference in New Issue
Block a user