Files
Yogstation/code/game/movable_luminosity.dm
Ling df044da860 Backports several SSlighting improvements: overlay lighting (#17271)
* Backports SSlighting optimizations

* Overlay lighting, first version compiles

* Change conflicting defines

* Sparks and beams dont count towards lumcount

* Fix rendering

* Various fixes

* Fix errors

* Fix PDA light


1

* a

* Update game_options.txt

* Fix plasmaman helmet

* Fixes

* Glowy changes

Co-authored-by: Jamie D <993128+JamieD1@users.noreply.github.com>
2023-01-13 22:42:23 +00:00

20 lines
650 B
Plaintext

///Keeps track of the sources of dynamic luminosity and updates our visibility with the highest.
/atom/movable/proc/update_dynamic_luminosity()
var/highest = 0
for(var/i in affected_dynamic_lights)
if(affected_dynamic_lights[i] <= highest)
continue
highest = affected_dynamic_lights[i]
if(highest == affecting_dynamic_lumi)
return
luminosity -= affecting_dynamic_lumi
affecting_dynamic_lumi = highest
luminosity += affecting_dynamic_lumi
///Helper to change several lighting overlay settings.
/atom/movable/proc/set_light_range_power_color(range, power, color)
set_light_range(range)
set_light_power(power)
set_light_color(color)