If the person inside a morgue tray is clonable, they now beep. Loudly. (#5302)

This commit is contained in:
CitadelStationBot
2018-02-05 05:35:44 -06:00
committed by Poojawa
parent 55741168c0
commit 2ab7a45cb9
+11
View File
@@ -141,12 +141,21 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
desc = "Used to keep bodies in until someone fetches them."
icon_state = "morgue1"
dir = EAST
var/beeper = TRUE
/obj/structure/bodycontainer/morgue/New()
connected = new/obj/structure/tray/m_tray(src)
connected.connected = src
..()
/obj/structure/bodycontainer/morgue/AltClick(mob/user)
..()
if(user.incapacitated())
to_chat(user, "<span class='warning'>You can't do that right now!</span>")
return
beeper = !beeper
to_chat(user, "<span class='notice'>You turn the speaker function [beeper ? "off" : "on"].</span>")
/obj/structure/bodycontainer/morgue/update_icon()
if (!connected || connected.loc != src) // Open or tray is gone.
icon_state = "morgue0"
@@ -164,6 +173,8 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
var/mob/living/mob_occupant = get_mob_or_brainmob(M)
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
break