Skip to content

Commit

Permalink
morgue trays can now be emagged (tgstation#75457)
Browse files Browse the repository at this point in the history
## About The Pull Request
you can emag morgue trays disabling the alarm system

## Why It's Good For The Game
keeps your enemies dead :J

## Changelog
:cl:
add: You can emag morgue trays to disable their life alerts.
/:cl:
  • Loading branch information
Fikou committed May 16, 2023
1 parent 3f926a6 commit cb62fe8
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions code/game/objects/structures/morgue.dm
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,12 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
beeper = !beeper
to_chat(user, span_notice("You turn the speaker function [beeper ? "on" : "off"]."))

/obj/structure/bodycontainer/morgue/emag_act(mob/user)
if(obj_flags & EMAGGED)
return
to_chat(user, span_warning("You overload [src]'s alert system."))
obj_flags |= EMAGGED

/obj/structure/bodycontainer/morgue/update_icon_state()
if(!connected || connected.loc != src) // Open or tray is gone.
icon_state = "morgue0"
Expand All @@ -229,10 +235,12 @@ GLOBAL_LIST_EMPTY(bodycontainers) //Let them act as spawnpoints for revenants an
if(!length(compiled)) // No mobs?
icon_state = "morgue3"
return ..()

for(var/mob/living/M in compiled)
var/mob/living/mob_occupant = get_mob_or_brainmob(M)
if(mob_occupant.client && !(HAS_TRAIT(mob_occupant, TRAIT_SUICIDED))&& !(HAS_TRAIT(mob_occupant, TRAIT_BADDNA)))

if(!(obj_flags & EMAGGED))
for(var/mob/living/occupant as anything in compiled)
var/mob/living/mob_occupant = get_mob_or_brainmob(occupant)
if(!mob_occupant.client || HAS_TRAIT(mob_occupant, TRAIT_SUICIDED) || HAS_TRAIT(mob_occupant, TRAIT_BADDNA))
continue
icon_state = "morgue4" // Revivable
if(mob_occupant.stat == DEAD && beeper && COOLDOWN_FINISHED(src, next_beep))
playsound(src, 'sound/weapons/gun/general/empty_alarm.ogg', 50, FALSE) //Revive them you blind fucks
Expand Down

0 comments on commit cb62fe8

Please sign in to comment.