From 0144bf1e6ebbc8a302e18f9903f3369cf7ee7f05 Mon Sep 17 00:00:00 2001 From: CHOMPStation2StaffMirrorBot <94713762+CHOMPStation2StaffMirrorBot@users.noreply.github.com> Date: Mon, 6 Jan 2025 20:43:47 -0700 Subject: [PATCH] [MIRROR] fix a runtime in the keyloop (#9813) Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com> --- code/game/turfs/simulated.dm | 3 ++- code/modules/clothing/spacesuits/rig/modules/protean.dm | 8 +++++++- code/modules/mob/living/carbon/human/human_defense.dm | 9 +++++---- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index d8f89feac3..612ba29685 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -196,7 +196,8 @@ B.blood_DNA = list() if(!B.blood_DNA[M.dna.unique_enzymes]) B.blood_DNA[M.dna.unique_enzymes] = M.dna.b_type - B.viruses = M.viruses.Copy() + if(M.viruses) + B.viruses = M.viruses.Copy() return 1 //we bloodied the floor blood_splatter(src,M.get_blood(M.vessel),1) return 1 //we bloodied the floor diff --git a/code/modules/clothing/spacesuits/rig/modules/protean.dm b/code/modules/clothing/spacesuits/rig/modules/protean.dm index f1e78a5e07..85b45e0c46 100644 --- a/code/modules/clothing/spacesuits/rig/modules/protean.dm +++ b/code/modules/clothing/spacesuits/rig/modules/protean.dm @@ -131,6 +131,9 @@ These should come standard with the Protean rigsuit, unless you want them to wor /obj/item/rig_module/protean/armor/process() if(active) var/mob/living/carbon/human/H = holder.wearer + if(!H) + deactivate(1) + return if(istype(H.species, /datum/species/protean)) to_chat(H, span_warning("Your Protean modules do not function on yourself.")) deactivate(1) @@ -185,7 +188,10 @@ These should come standard with the Protean rigsuit, unless you want them to wor if(active) var/mob/living/carbon/human/H = holder.wearer var/mob/living/P = holder?:myprotean - if((istype(H.species, /datum/species/protean)) || !H || !P) + if(!H || !P) + deactivate() + return + if(istype(H.species, /datum/species/protean)) to_chat(H, span_warning("Your Protean modules do not function on yourself.")) deactivate() return diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index cd4a737e06..e87ab2162e 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -579,10 +579,11 @@ emp_act /mob/living/carbon/human/proc/bloody_hands(var/mob/living/source, var/amount = 2) - if (gloves) - gloves.add_blood(source) - gloves:transfer_blood = amount - gloves:bloody_hands_mob = source + if (istype(gloves, /obj/item/clothing/gloves)) + var/obj/item/clothing/gloves/gl = gloves + gl.add_blood(source) + gl.transfer_blood = amount + gl.bloody_hands_mob = source else add_blood(source) bloody_hands = amount