From 687d452d67b2d2ed639ef9f1c53947c1fd02d96f Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Wed, 23 Oct 2019 16:15:26 +0200 Subject: [PATCH] #44222, yea sorry for your rework Poojawa. --- code/__DEFINES/forensics.dm | 3 +-- code/modules/clothing/gloves/_gloves.dm | 2 +- code/modules/clothing/head/_head.dm | 2 +- code/modules/clothing/masks/_masks.dm | 2 +- code/modules/clothing/neck/_neck.dm | 2 +- code/modules/clothing/shoes/_shoes.dm | 2 +- code/modules/clothing/suits/_suits.dm | 2 +- code/modules/clothing/under/_under.dm | 2 +- 8 files changed, 8 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/forensics.dm b/code/__DEFINES/forensics.dm index fe325e3397..c98e680876 100644 --- a/code/__DEFINES/forensics.dm +++ b/code/__DEFINES/forensics.dm @@ -1,2 +1 @@ -#define IF_HAS_BLOOD_DNA(__thing) var/datum/component/forensics/__FR##__thing = __thing.GetComponent(/datum/component/forensics); if(__FR##__thing && length(__FR##__thing.blood_DNA)) -#define IF_HAS_BLOOD_DNA_AND(__thing, __conditions...) var/datum/component/forensics/__FR##__thing = __thing.GetComponent(/datum/component/forensics); if(__FR##__thing && length(__FR##__thing.blood_DNA) && (##__conditions)) +#define HAS_BLOOD_DNA(thing) (length(thing.GetComponent(/datum/component/forensics)?.blood_DNA)) \ No newline at end of file diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index f0c1eeb833..834b1442f3 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -30,7 +30,7 @@ if(!isinhands) if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damagedgloves") - IF_HAS_BLOOD_DNA(src) + if(HAS_BLOOD_DNA(src)) . += mutable_appearance('icons/effects/blood.dmi', "bloodyhands") /obj/item/clothing/gloves/update_clothes_damaged_state(damaging = TRUE) diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm index 8bd7065c1f..22fb498863 100644 --- a/code/modules/clothing/head/_head.dm +++ b/code/modules/clothing/head/_head.dm @@ -46,7 +46,7 @@ if(!isinhands) if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damagedhelmet") - IF_HAS_BLOOD_DNA(src) + if(HAS_BLOOD_DNA(src)) . += mutable_appearance('icons/effects/blood.dmi', "helmetblood") /obj/item/clothing/head/update_clothes_damaged_state(damaging = TRUE) diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index 9ee2ebcd54..6579ac7c92 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -59,7 +59,7 @@ if(body_parts_covered & HEAD) if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damagedmask") - IF_HAS_BLOOD_DNA(src) + if(HAS_BLOOD_DNA(src)) . += mutable_appearance('icons/effects/blood.dmi', "maskblood") /obj/item/clothing/mask/update_clothes_damaged_state(damaging = TRUE) diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index 330f69ddaf..b4662ca94f 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -12,7 +12,7 @@ if(body_parts_covered & HEAD) if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damagedmask") - IF_HAS_BLOOD_DNA(src) + if(HAS_BLOOD_DNA(src)) . += mutable_appearance('icons/effects/blood.dmi', "maskblood") /obj/item/clothing/neck/tie diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 00cb2678cd..8b756dc21f 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -46,7 +46,7 @@ . = list() if(!isinhands) var/bloody = FALSE - IF_HAS_BLOOD_DNA(src) + if(HAS_BLOOD_DNA(src)) bloody = TRUE else bloody = bloody_shoes[BLOOD_STATE_HUMAN] diff --git a/code/modules/clothing/suits/_suits.dm b/code/modules/clothing/suits/_suits.dm index 342429e480..40f7691ac5 100644 --- a/code/modules/clothing/suits/_suits.dm +++ b/code/modules/clothing/suits/_suits.dm @@ -54,7 +54,7 @@ if(!isinhands) if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damaged[blood_overlay_type]") - IF_HAS_BLOOD_DNA(src) + if(HAS_BLOOD_DNA(src)) if(tauric) . += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood") else diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index c2c3f19b9d..babbbb2ff9 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -22,7 +22,7 @@ if(!isinhands) if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damageduniform") - IF_HAS_BLOOD_DNA(src) + if(HAS_BLOOD_DNA(src)) . += mutable_appearance('icons/effects/blood.dmi', "uniformblood") if(accessory_overlay) . += accessory_overlay