Ok, done.
This commit is contained in:
@@ -291,8 +291,7 @@
|
||||
QDEL_NULL(cell)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/light/update_icon()
|
||||
cut_overlays()
|
||||
/obj/machinery/light/update_icon_state()
|
||||
switch(status) // set icon_states
|
||||
if(LIGHT_OK)
|
||||
var/area/A = get_base_area(src)
|
||||
@@ -303,17 +302,20 @@
|
||||
icon_state = "[base_state]_hijacked"
|
||||
else
|
||||
icon_state = "[base_state]"
|
||||
if(on)
|
||||
var/mutable_appearance/glowybit = mutable_appearance(overlayicon, base_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
glowybit.alpha = CLAMP(light_power*250, 30, 200)
|
||||
add_overlay(glowybit)
|
||||
if(LIGHT_EMPTY)
|
||||
icon_state = "[base_state]-empty"
|
||||
if(LIGHT_BURNED)
|
||||
icon_state = "[base_state]-burned"
|
||||
if(LIGHT_BROKEN)
|
||||
icon_state = "[base_state]-broken"
|
||||
return
|
||||
|
||||
/obj/machinery/light/update_overlays()
|
||||
. = ..()
|
||||
if(on && status == LIGHT_OK)
|
||||
var/mutable_appearance/glowybit = mutable_appearance(overlayicon, base_state, ABOVE_LIGHTING_LAYER, ABOVE_LIGHTING_PLANE)
|
||||
glowybit.alpha = CLAMP(light_power*250, 30, 200)
|
||||
. += glowybit
|
||||
|
||||
|
||||
// update the icon_state and luminosity of the light depending on its state
|
||||
/obj/machinery/light/proc/update(trigger = TRUE)
|
||||
|
||||
Reference in New Issue
Block a user