Skip to content
14 changes: 10 additions & 4 deletions code/game/objects/items/bodybag.dm
Original file line number Diff line number Diff line change
Expand Up @@ -164,11 +164,10 @@

/obj/structure/closet/bodybag/attack_hand(mob/living/user)
if(!opened)
if(open_cooldown > world.time)
to_chat(user, SPAN_WARNING("\The [src] has been opened too recently!"))
return
open_cooldown = world.time + 10 //1s cooldown for opening and closing, stop that spam! - stan_albatross
if(opened && open_cooldown > world.time)
to_chat(user, SPAN_WARNING("\The [src] has been opened too recently!"))
return
user.visible_message(SPAN_WARNING("[user] opens [src]."), SPAN_NOTICE("You open [src]."))
. = ..()


Expand Down Expand Up @@ -286,6 +285,13 @@

overlays |= holo_card_icon

/obj/structure/closet/bodybag/cryobag/attack_hand(mob/living/user)
if(!opened && stasis_mob && open_cooldown <= world.time)
user.visible_message(SPAN_WARNING("[user] opens [src]."), SPAN_NOTICE("You open [src]."))
user.attack_log += text("\[[time_stamp()]\] opened stasis bag containing <b>[key_name(stasis_mob)]</b> at [get_area(src)] ([loc.x],[loc.y],[loc.z])")
stasis_mob.attack_log += text("\[[time_stamp()]\] had their stasis bag opened by <b>[key_name(user)]</b> at [get_area(src)] ([loc.x],[loc.y],[loc.z])")
. = ..()

/obj/structure/closet/bodybag/cryobag/open(mob/user, force)
. = ..()
if(stasis_mob)
Expand Down