[MIRROR] Adds five second cooldown to morgue tray beeps (#5652)

* Adds five second cooldown to morgue tray beeps (#35818)

* Adds five second cooldown to morgue tray beeps
This commit is contained in:
CitadelStationBot
2018-02-22 01:37:06 -06:00
committed by Poojawa
parent dc215016bc
commit da690f3e07

View File

@@ -145,6 +145,8 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
icon_state = "morgue1"
dir = EAST
var/beeper = TRUE
var/beep_cooldown = 50
var/next_beep = 0
/obj/structure/bodycontainer/morgue/New()
connected = new/obj/structure/tray/m_tray(src)
@@ -180,7 +182,9 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
if(mob_occupant.client && !mob_occupant.suiciding && !(mob_occupant.has_trait(TRAIT_NOCLONE)) && !mob_occupant.hellbound)
icon_state = "morgue4" // Cloneable
if(mob_occupant.stat == DEAD && beeper)
playsound(src, 'sound/weapons/smg_empty_alarm.ogg', 50, 0) //Clone them you blind fucks
if(world.time > next_beep)
playsound(src, 'sound/weapons/smg_empty_alarm.ogg', 50, 0) //Clone them you blind fucks
next_beep = world.time + beep_cooldown
break