mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
turns off fire alarm sounds when power is off (#20956)
* turns off alarm sounds when power is off when power is turned off a given fire alarm will stop playing the alarm sound. * resumes alarm when power returns firealarm sound returns when power is restored
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user