diff --git a/code/__DEFINES/flags.dm b/code/__DEFINES/flags.dm index 0e7a5a0f217..04a20338c1f 100644 --- a/code/__DEFINES/flags.dm +++ b/code/__DEFINES/flags.dm @@ -106,4 +106,9 @@ #define SLOT_DENYPOCKET 4096 //this is to deny items with a w_class of 2 or 1 to fit in pockets. #define SLOT_TWOEARS 8192 #define SLOT_PDA 16384 -#define SLOT_TIE 32768 \ No newline at end of file +#define SLOT_TIE 32768 + +//ORGAN TYPE FLAGS +#define AFFECT_ROBOTIC_ORGAN 1 +#define AFFECT_ORGANIC_ORGAN 2 +#define AFFECT_ALL_ORGANS 3 \ No newline at end of file diff --git a/code/datums/diseases/advance/symptoms/damage_converter.dm b/code/datums/diseases/advance/symptoms/damage_converter.dm index bf0d5aaf8b3..eb7afcaf6be 100644 --- a/code/datums/diseases/advance/symptoms/damage_converter.dm +++ b/code/datums/diseases/advance/symptoms/damage_converter.dm @@ -40,7 +40,7 @@ Bonus if(istype(M, /mob/living/carbon/human)) var/mob/living/carbon/human/H = M - var/list/parts = H.get_damaged_organs(1,1) //1,1 because it needs inputs. + var/list/parts = H.get_damaged_organs(1,1, AFFECT_ORGANIC_ORGAN) //1,1 because it needs inputs. if(!parts.len) return diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm index cf47ee3b5d0..88e655beb0e 100644 --- a/code/modules/mob/living/carbon/human/human_damage.dm +++ b/code/modules/mob/living/carbon/human/human_damage.dm @@ -212,10 +212,14 @@ //////////////////////////////////////////// //Returns a list of damaged organs -/mob/living/carbon/human/proc/get_damaged_organs(var/brute, var/burn) +/mob/living/carbon/human/proc/get_damaged_organs(var/brute, var/burn, var/flags = AFFECT_ALL_ORGANS) var/list/obj/item/organ/external/parts = list() for(var/obj/item/organ/external/O in organs) if((brute && O.brute_dam) || (burn && O.burn_dam)) + if(!(flags & AFFECT_ROBOTIC_ORGAN) && O.status & ORGAN_ROBOT) + continue + if(!(flags & AFFECT_ORGANIC_ORGAN) && !(O.status & ORGAN_ROBOT)) + continue parts += O return parts