mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge branch 'master' into upstream-merge-10764
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user