From d1dcfb63f8912196249636abf0998a0fd1994db0 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sun, 8 Oct 2017 01:04:26 -0500 Subject: [PATCH] [MIRROR] Miscellaneous virus fixes (#3216) * Miscellaneous virus fixes (#31391) * Probably fixes neutering bugs * Proper targeting for healing * Fixes itching affecting roboparts * Miscellaneous virus fixes --- code/datums/diseases/advance/advance.dm | 2 +- code/datums/diseases/advance/symptoms/heal.dm | 8 ++++---- code/datums/diseases/advance/symptoms/itching.dm | 13 ++++++++----- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/code/datums/diseases/advance/advance.dm b/code/datums/diseases/advance/advance.dm index 26f42fa059..1b3633207c 100644 --- a/code/datums/diseases/advance/advance.dm +++ b/code/datums/diseases/advance/advance.dm @@ -123,7 +123,7 @@ /datum/disease/advance/proc/HasSymptom(datum/symptom/S) for(var/datum/symptom/symp in symptoms) - if(symp.id == S.id) + if(symp.type == S.type) return 1 return 0 diff --git a/code/datums/diseases/advance/symptoms/heal.dm b/code/datums/diseases/advance/symptoms/heal.dm index 5167b17e0d..869cea19da 100644 --- a/code/datums/diseases/advance/symptoms/heal.dm +++ b/code/datums/diseases/advance/symptoms/heal.dm @@ -131,7 +131,7 @@ Bonus /datum/symptom/heal/brute/Heal(mob/living/carbon/M, datum/disease/advance/A) var/heal_amt = 2 * power - var/list/parts = M.get_damaged_bodyparts(1,1) //1,1 because it needs inputs. + var/list/parts = M.get_damaged_bodyparts(1,0) //brute only if(!parts.len) return @@ -175,7 +175,7 @@ Bonus /datum/symptom/heal/brute/plus/Heal(mob/living/carbon/M, datum/disease/advance/A) var/heal_amt = 4 * power - var/list/parts = M.get_damaged_bodyparts(1,1) //1,1 because it needs inputs. + var/list/parts = M.get_damaged_bodyparts(1,0) //brute only if(M.getCloneLoss() > 0) M.adjustCloneLoss(-1) @@ -225,7 +225,7 @@ Bonus /datum/symptom/heal/burn/Heal(mob/living/carbon/M, datum/disease/advance/A) var/heal_amt = 2 * power - var/list/parts = M.get_damaged_bodyparts(1,1) //1,1 because it needs inputs. + var/list/parts = M.get_damaged_bodyparts(0,1) //burn only if(!parts.len) return @@ -268,7 +268,7 @@ Bonus /datum/symptom/heal/burn/plus/Heal(mob/living/carbon/M, datum/disease/advance/A) var/heal_amt = 4 * power - var/list/parts = M.get_damaged_bodyparts(1,1) //1,1 because it needs inputs. + var/list/parts = M.get_damaged_bodyparts(0,1) //burn only if(M.bodytemperature > 310) M.bodytemperature = max(310, M.bodytemperature - (10 * heal_amt * TEMPERATURE_DAMAGE_COEFFICIENT)) diff --git a/code/datums/diseases/advance/symptoms/itching.dm b/code/datums/diseases/advance/symptoms/itching.dm index 119b04b48a..ea9156bfbd 100644 --- a/code/datums/diseases/advance/symptoms/itching.dm +++ b/code/datums/diseases/advance/symptoms/itching.dm @@ -43,8 +43,11 @@ BONUS /datum/symptom/itching/Activate(datum/disease/advance/A) if(!..()) return - var/mob/living/M = A.affected_mob - var/can_scratch = scratch && !M.incapacitated() - to_chat(M, "Your [pick("back", "arm", "leg", "elbow", "head")] itches. [can_scratch ? " You scratch it." : ""]") - if(can_scratch) - M.adjustBruteLoss(0.5) \ No newline at end of file + var/mob/living/carbon/M = A.affected_mob + var/picked_bodypart = pick("head", "chest", "r_arm", "l_arm", "r_leg", "l_leg") + var/obj/item/bodypart/bodypart = M.get_bodypart(picked_bodypart) + if(bodypart && bodypart.status == BODYPART_ORGANIC && !bodypart.is_pseudopart) //robotic limbs will mean less scratching overall + var/can_scratch = scratch && !M.incapacitated() && get_location_accessible(M, picked_bodypart) + M.visible_message("[can_scratch ? "[M] scratches [M.p_their()] [bodypart.name]." : ""]", "Your [bodypart.name] itches. [can_scratch ? " You scratch it." : ""]") + if(can_scratch) + bodypart.receive_damage(0.5) \ No newline at end of file