From b35a9f3af39b76765e7b66dc37740868a3b346a0 Mon Sep 17 00:00:00 2001 From: Dovixx Date: Sat, 19 Sep 2020 23:16:59 +0300 Subject: [PATCH] Add the checks --- code/_onclick/hud/screen_objects.dm | 2 +- code/game/objects/items/weapons/defib.dm | 2 ++ code/game/objects/structures/stool_bed_chair_nest/bed.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 1423720f8f6..9795975a090 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -483,7 +483,7 @@ var/list/cached_healthdoll_overlays = list() // List of icon states (strings) for overlays /obj/screen/healthdoll/Click() - if(ishuman(usr)) + if(ishuman(usr) && !usr.is_dead()) var/mob/living/carbon/H = usr H.check_self_for_injuries() diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index ee98d309876..fb4c86c59d1 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -141,6 +141,8 @@ if(paddles_on_defib) //Detach the paddles into the user's hands + if(usr.incapacitated()) return + if(!usr.put_in_hands(paddles)) to_chat(user, "You need a free hand to hold the paddles!") update_icon() diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 9d0d4568e73..d91caa4244f 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -117,7 +117,7 @@ /obj/structure/bed/roller/MouseDrop(over_object, src_location, over_location) ..() if(over_object == usr && Adjacent(usr) && (in_range(src, usr) || usr.contents.Find(src))) - if(!ishuman(usr)) + if(!ishuman(usr) || usr.incapacitated()) return if(has_buckled_mobs()) return 0 diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 4cb846139f7..cb4c4968fc1 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1173,7 +1173,7 @@ set src in view(1) var/self = 0 - if(usr.stat == 1 || usr.restrained() || !isliving(usr)) return + if(usr.stat == 1 || usr.restrained() || !isliving(usr) || usr.is_dead()) return if(usr == src) self = 1