mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Merge pull request #9883 from mwerezak/ert-lights
Adds more coloured lights
This commit is contained in:
@@ -7,11 +7,19 @@
|
||||
var/list/light_sources
|
||||
|
||||
/atom/proc/set_light(l_range, l_power, l_color)
|
||||
if(l_power != null) light_power = l_power
|
||||
if(l_range != null) light_range = l_range
|
||||
if(l_color != null) light_color = l_color
|
||||
. = 0 //make it less costly if nothing's changed
|
||||
|
||||
update_light()
|
||||
if(l_power != null && l_power != light_power)
|
||||
light_power = l_power
|
||||
. = 1
|
||||
if(l_range != null && l_range != light_range)
|
||||
light_range = l_range
|
||||
. = 1
|
||||
if(l_color != null && l_color != light_color)
|
||||
light_color = l_color
|
||||
. = 1
|
||||
|
||||
if(.) update_light()
|
||||
|
||||
/atom/proc/update_light()
|
||||
if(!light_power || !light_range)
|
||||
|
||||
Reference in New Issue
Block a user