Fixes an issue with flashers and mounted igniters, unanchored flashers will not appear as on (#18608)

* stat moment

* Theres more of it...

* wow! emissives!

* steelslayer review
This commit is contained in:
Contrabang
2022-08-06 09:54:28 -07:00
committed by GitHub
parent 5994584233
commit 86df43ea2c
3 changed files with 9 additions and 8 deletions
+8 -7
View File
@@ -34,18 +34,18 @@
AddComponent(/datum/component/proximity_monitor)
/obj/machinery/flasher/power_change()
if( powered() )
if(powered())
stat &= ~NOPOWER
set_light(1, LIGHTING_MINIMUM_POWER)
else
stat |= ~NOPOWER
stat |= NOPOWER
set_light(0)
update_icon()
/obj/machinery/flasher/update_icon_state()
. = ..()
if(stat & NOPOWER)
if((stat & NOPOWER) || !anchored)
icon_state = "[base_state]1-p"
else
icon_state = "[base_state]1"
@@ -53,11 +53,13 @@
/obj/machinery/flasher/update_overlays()
. = ..()
underlays.Cut()
cut_overlays()
if(stat & NOPOWER)
return
underlays += emissive_appearance(icon, "[base_state]_lightmask")
if(anchored)
. += "[base_state]-s"
underlays += emissive_appearance(icon, "[base_state]_lightmask")
//Let the AI trigger them directly.
@@ -125,10 +127,9 @@
anchored = !anchored
if(anchored)
WRENCH_ANCHOR_MESSAGE
overlays.Cut()
else
WRENCH_UNANCHOR_MESSAGE
overlays += "[base_state]-s"
update_icon()
// Flasher button
/obj/machinery/flasher_button
+1 -1
View File
@@ -88,7 +88,7 @@
icon_state = "[base_state]"
// src.sd_set_light(2)
else
stat |= ~NOPOWER
stat |= NOPOWER
icon_state = "[base_state]-p"
// src.sd_set_light(0)
Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 KiB

After

Width:  |  Height:  |  Size: 91 KiB