diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 3d8bf4848d6..bcd697ce590 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -237,11 +237,19 @@ FIRE ALARM else set_light(l_power = LIGHTING_MINIMUM_POWER) +/obj/machinery/firealarm/proc/update_fire_sound(fire) + var/area/A = get_area(src) + if(stat & NOPOWER) + GLOB.firealarm_soundloop.stop(src, TRUE) + else if(A.fire) + GLOB.firealarm_soundloop.start(src) + /obj/machinery/firealarm/power_change() if(!..()) return update_fire_light() update_icon() + update_fire_sound() /obj/machinery/firealarm/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN) || buildstage != 2)