mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 02:09:41 +00:00
Air alarms play a sound when there is an alarm
This commit is contained in:
@@ -103,6 +103,9 @@
|
||||
var/phoron_dangerlevel = 0
|
||||
var/temperature_dangerlevel = 0
|
||||
var/other_dangerlevel = 0
|
||||
|
||||
var/alarm_sound_cooldown = 100
|
||||
var/last_sound_time = 0
|
||||
|
||||
/obj/machinery/alarm/server/New()
|
||||
..()
|
||||
@@ -168,6 +171,10 @@
|
||||
var/turf/simulated/location = loc
|
||||
if(!istype(location)) return//returns if loc is not simulated
|
||||
|
||||
if ((alarm_area.fire || alarm_area.atmosalm >= 2) && world.time > last_sound_time + alarm_sound_cooldown)
|
||||
playsound(src.loc, 'sound/machines/airalarm.ogg', 40, 0, 5)
|
||||
last_sound_time = world.time
|
||||
|
||||
var/datum/gas_mixture/environment = location.return_air()
|
||||
|
||||
//Handle temperature adjustment here.
|
||||
|
||||
BIN
sound/machines/airalarm.ogg
Normal file
BIN
sound/machines/airalarm.ogg
Normal file
Binary file not shown.
Reference in New Issue
Block a user