mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
* 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>
20 lines
650 B
Plaintext
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)
|