Merge branch 'master' into upstream-merge-10764

This commit is contained in:
Razgriz
2021-07-03 00:26:13 -07:00
committed by GitHub
524 changed files with 3995 additions and 3056 deletions

View File

@@ -26,7 +26,7 @@
stack_trace("a lighting object was assigned to a turf that already had a lighting object!")
affected_turf.lighting_object = src
affected_turf.luminosity = 0
affected_turf.set_luminosity(0)
for(var/turf/space/space_tile in RANGE_TURFS(1, affected_turf))
space_tile.update_starlight()
@@ -40,7 +40,7 @@
SSlighting.objects_queue -= src
if (isturf(affected_turf))
affected_turf.lighting_object = null
affected_turf.luminosity = 1
affected_turf.set_luminosity(1)
affected_turf.underlays -= current_underlay
affected_turf = null
return ..()
@@ -112,7 +112,7 @@
affected_turf.underlays += current_underlay
affected_turf.luminosity = set_luminosity
affected_turf.set_luminosity(set_luminosity)
/datum/lighting_object/proc/removefromturf()
affected_turf.underlays -= current_underlay

View File

@@ -93,6 +93,13 @@
return
recalculate_directional_opacity()
///Setter for the byond luminosity var
/turf/proc/set_luminosity(new_luminosity, force)
// SSplanets handles outdoor turfs
if(outdoors && !force)
return
luminosity = new_luminosity
///Calculate on which directions this turfs block view.
/turf/proc/recalculate_directional_opacity()