diff --git a/code/__HELPERS/_cit_helpers.dm b/code/__HELPERS/_cit_helpers.dm index 1b1cae43bb..3c693e51d9 100644 --- a/code/__HELPERS/_cit_helpers.dm +++ b/code/__HELPERS/_cit_helpers.dm @@ -122,6 +122,23 @@ GLOBAL_LIST_INIT(regular_bloods,list( "AB+" )) +GLOBAL_LIST_INIT(all_types_bloods,list( + "O-", + "O+", + "A-", + "A+", + "B-", + "B+", + "AB-", + "AB+", + "SY", + "X*", + "HF", + "L", + "U", + "GEL" + )) + GLOBAL_LIST_INIT(blood_types, list( "blood", "syntheticblood", diff --git a/code/datums/components/decals/blood.dm b/code/datums/components/decals/blood.dm index 98e92ce710..ba69e07d65 100644 --- a/code/datums/components/decals/blood.dm +++ b/code/datums/components/decals/blood.dm @@ -15,21 +15,21 @@ _icon_state = "itemblood" var/icon = initial(I.icon) var/icon_state = initial(I.icon_state) - var/color = initial(I.blood_DNA_to_color(I.blood_mix_types)) if(!icon || !icon_state) // It's something which takes on the look of other items, probably icon = I.icon icon_state = I.icon_state + GET_COMPONENT(D, /datum/component/forensics) var/static/list/blood_splatter_appearances = list() //try to find a pre-processed blood-splatter. otherwise, make a new one - var/index = "[REF(icon)]-[icon_state]-[color]" + var/index = "[REF(icon)]-[icon_state]-[D.blood_mix_color]" pic = blood_splatter_appearances[index] if(!pic) var/icon/blood_splatter_icon = icon(initial(I.icon), initial(I.icon_state), , 1) //we only want to apply blood-splatters to the initial icon_state for each object blood_splatter_icon.Blend("#fff", ICON_ADD) //fills the icon_state with white (except where it's transparent) blood_splatter_icon.Blend(icon(_icon, _icon_state), ICON_MULTIPLY) //adds blood and the remaining white areas become transparant - blood_splatter_icon.color = I.blood_DNA_to_color(I.blood_mix_types) //Colors it based upon blood color mix + blood_splatter_icon.Blend(D.blood_mix_color, ICON_MULTIPLY) //add the blood's color with DNA information blood_splatter_appearances[index] = pic return TRUE diff --git a/code/datums/components/forensics.dm b/code/datums/components/forensics.dm index 29aaa9bf02..fdc5c5fe5d 100644 --- a/code/datums/components/forensics.dm +++ b/code/datums/components/forensics.dm @@ -5,6 +5,7 @@ var/list/blood_DNA //assoc dna = bloodtype var/list/fibers //assoc print = print var/list/blood_mix_types // data("[blood_type]" = sting list + var/blood_mix_color /datum/component/forensics/InheritComponent(datum/component/forensics/F, original) //Use of | and |= being different here is INTENTIONAL. fingerprints = fingerprints | F.fingerprints @@ -12,10 +13,11 @@ blood_DNA = blood_DNA | F.blood_DNA fibers = fibers | F.fibers blood_mix_types = blood_mix_types | F.blood_mix_types + blood_mix_color = blood_mix_color | F.blood_mix_color check_blood() return ..() -/datum/component/forensics/Initialize(new_fingerprints, new_hiddenprints, new_blood_DNA, new_fibers, new_blood_mix_types) +/datum/component/forensics/Initialize(new_fingerprints, new_hiddenprints, new_blood_DNA, new_fibers, new_blood_mix_types, new_blood_mix_color) if(!isatom(parent)) return COMPONENT_INCOMPATIBLE fingerprints = new_fingerprints @@ -23,6 +25,7 @@ blood_DNA = new_blood_DNA fibers = new_fibers blood_mix_types = new_blood_mix_types + blood_mix_color = new_blood_mix_color check_blood() RegisterSignal(parent, COMSIG_COMPONENT_CLEAN_ACT, .proc/clean_act) @@ -36,6 +39,7 @@ /datum/component/forensics/proc/wipe_blood_DNA() blood_DNA = null blood_mix_types = null + blood_mix_color = null return TRUE /datum/component/forensics/proc/wipe_fibers() @@ -150,6 +154,8 @@ LAZYINITLIST(blood_DNA) for(var/i in dna) blood_DNA[i] = dna[i] + var/blood_type = blood_DNA.Find(GLOB.all_types_bloods) + add_blood_list(blood_type) check_blood() return TRUE @@ -159,38 +165,21 @@ if(!length(blood_DNA)) return -/datum/component/forensics/proc/add_blood_list_check(list/_blood_mix_types) - if(!length(_blood_mix_types)) +/datum/component/forensics/proc/add_blood_list(blood_type) + if(!blood_type) return LAZYINITLIST(blood_mix_types) - for(var/i in _blood_mix_types) //We use an associative list, because all the other cool kids are doing it - blood_mix_types[i] = i + blood_list_checks(blood_mix_types, blood_type) + blood_DNA_to_color(blood_mix_types) return TRUE -/datum/component/forensics/proc/blood_list_checks(Atom/A, var/blood_type) //This is a messy attempt at trying to reduce lists of items and mobs with blood colors on them +/datum/component/forensics/proc/blood_list_checks(list/blood_types, var/blood_type) //This is a messy attempt at trying to reduce lists of items and mobs with blood colors on them if(blood_type in GLOB.regular_bloods) blood_type = "A+" //generic so we don't have 8 different types of human blood - if(is_cleanable(src)) - var/obj/effect/decal/cleanable/CL = src - if(blood_type in CL.blood_mix_types) - return - else - LAZYSET(blood_type,CL.blood_mix_types, CL.blood_mix_types) - CL.blood_color = blood_DNA_to_color(CL.blood_mix_types) - else if(isitem(src)) - var/obj/item/I = src - if(blood_type in I.blood_mix_types) - return - else - LAZYSET(blood_type,I.blood_mix_types, I.blood_mix_types) - I.blood_color = blood_DNA_to_color(I.blood_mix_types) - else if(iscarbon(src)) - var/mob/living/carbon/C = src - if(blood_type in C.blood_mix_types) - return - else - LAZYSET(blood_type,C.blood_mix_types, C.blood_mix_types) - C.blood_color = blood_DNA_to_color(C.blood_mix_types) + if(blood_type in blood_mix_types) + return + else + LAZYADD(blood_mix_types, blood_type) return TRUE /datum/component/forensics/proc/blood_DNA_to_color(list/bloods) @@ -208,4 +197,6 @@ i++ else final_rgb = BlendRGB(final_rgb, bloodtype_to_color(bloods)) - return final_rgb + + blood_mix_color = final_rgb + return TRUE diff --git a/code/game/objects/effects/decals/cleanable.dm b/code/game/objects/effects/decals/cleanable.dm index 2059b5f57f..8e922b5b39 100644 --- a/code/game/objects/effects/decals/cleanable.dm +++ b/code/game/objects/effects/decals/cleanable.dm @@ -5,7 +5,7 @@ var/blood_state = "" //I'm sorry but cleanable/blood code is ass, and so is blood_DNA var/bloodiness = 0 //0-100, amount of blood in this decal, used for making footprints and affecting the alpha of bloody footprints var/mergeable_decal = TRUE //when two of these are on a same tile or do we need to merge them into just one? - var/blood_color = BLOOD_COLOR_HUMAN + var/blood_color /obj/effect/decal/cleanable/Initialize(mapload, list/datum/disease/diseases) . = ..() @@ -75,14 +75,6 @@ var/mob/living/carbon/human/H = O if(H.shoes && blood_state && bloodiness && (!H.has_trait(TRAIT_LIGHT_STEP) || !H.mind.assigned_role == "Detective")) var/obj/item/clothing/shoes/S = H.shoes - for(var/datum/reagent/R in reagents.reagent_list) - // Get blood data from the blood reagent. - if(istype(R, /datum/reagent/blood)) - if(R.data["blood_type"]) - S.blood_list_checks(src, R.data["blood_type"]) - else if(istype(R, /datum/reagent/liquidgibs)) - if(R.data["blood_type"]) - S.blood_list_checks(src, R.data["blood_type"]) var/add_blood = 0 if(bloodiness >= BLOOD_GAIN_PER_STEP) add_blood = BLOOD_GAIN_PER_STEP @@ -96,29 +88,8 @@ H.update_inv_shoes() else if(H.bloodiness && blood_state && bloodiness && (!H.has_trait(TRAIT_LIGHT_STEP) || !H.mind.assigned_role == "Detective")) - for(var/datum/reagent/R in reagents.reagent_list) - // Get blood data from the blood reagent. - if(istype(R, /datum/reagent/blood)) - if(R.data["blood_type"]) - H.blood_list_checks(src, R.data["blood_type"]) - else if(istype(R, /datum/reagent/liquidgibs)) - if(R.data["blood_type"]) - H.blood_list_checks(src, R.data["blood_type"]) - var/add_blood = 0 - if(H.bloodiness >= BLOOD_GAIN_PER_STEP) - add_blood = BLOOD_GAIN_PER_STEP - else - add_blood = bloodiness - bloodiness -= add_blood - H.blood_smear[blood_state] = min(MAX_SHOE_BLOODINESS,H.blood_smear[blood_state]+add_blood) - H.add_blood_DNA(return_blood_DNA()) - H.blood_state = blood_state - update_icon() - - else - color = blood_DNA_to_color() var/add_blood = 0 - if(bloodiness >= BLOOD_GAIN_PER_STEP) + if(H.bloodiness >= BLOOD_GAIN_PER_STEP) add_blood = BLOOD_GAIN_PER_STEP else add_blood = bloodiness diff --git a/code/game/objects/effects/decals/cleanable/aliens.dm b/code/game/objects/effects/decals/cleanable/aliens.dm index 52168d4e69..29c8332529 100644 --- a/code/game/objects/effects/decals/cleanable/aliens.dm +++ b/code/game/objects/effects/decals/cleanable/aliens.dm @@ -7,8 +7,7 @@ /obj/effect/decal/cleanable/blood/xeno/Initialize() . = ..() - if(!data) - data = add_blood_DNA(list("donor"= "UNKNOWN DNA","bloodcolor" = BLOOD_COLOR_XENO, "blood_type"= "X*")) + add_blood_DNA(list("UNKNOWN DNA" = "X*")) /obj/effect/decal/cleanable/blood/splatter/xeno color = BLOOD_COLOR_XENO @@ -65,5 +64,4 @@ /obj/effect/decal/cleanable/blood/xeno/tracks/Initialize() . = ..() - if(!data) - data = add_blood_DNA(list("UNKNOWN DNA" = "X*")) \ No newline at end of file + add_blood_DNA(list("UNKNOWN DNA" = "X*")) \ No newline at end of file diff --git a/code/game/objects/effects/decals/cleanable/gibs.dm b/code/game/objects/effects/decals/cleanable/gibs.dm index 5e7b470be8..9adde3f51b 100644 --- a/code/game/objects/effects/decals/cleanable/gibs.dm +++ b/code/game/objects/effects/decals/cleanable/gibs.dm @@ -7,13 +7,16 @@ mergeable_decal = FALSE var/gib_overlay = FALSE var/slimy_gibs = FALSE + var/body_colors /obj/effect/decal/cleanable/blood/gibs/proc/guts() if(gib_overlay) var/mutable_appearance/gibz = mutable_appearance(icon, icon_state + "-overlay") + var/mutable_appearance/gibz2 = mutable_appearance(icon, icon_state + "c-overlay", color = body_colors) if(!slimy_gibs) gibz.appearance_flags = RESET_COLOR add_overlay(gibz) + add_overlay(gibz2) /obj/effect/decal/cleanable/blood/gibs/ex_act(severity, target) return @@ -98,26 +101,32 @@ /obj/effect/decal/cleanable/blood/gibs/human/up random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibup1","gibup1","gibup1") gib_overlay = TRUE + slimy_gibs = TRUE /obj/effect/decal/cleanable/blood/gibs/human/down random_icon_states = list("gib1", "gib2", "gib3", "gib4", "gib5", "gib6","gibdown1","gibdown1","gibdown1") gib_overlay = TRUE + slimy_gibs = TRUE /obj/effect/decal/cleanable/blood/gibs/human/body random_icon_states = list("gibhead", "gibtorso") gib_overlay = TRUE + slimy_gibs = TRUE /obj/effect/decal/cleanable/blood/gibs/human/torso random_icon_states = list("gibtorso") gib_overlay = TRUE + slimy_gibs = TRUE /obj/effect/decal/cleanable/blood/gibs/human/limb random_icon_states = list("gibleg", "gibarm") gib_overlay = TRUE + slimy_gibs = TRUE /obj/effect/decal/cleanable/blood/gibs/human/core random_icon_states = list("gibmid1", "gibmid2", "gibmid3") gib_overlay = TRUE + slimy_gibs = TRUE // Slime Gibs /obj/effect/decal/cleanable/blood/gibs/slime diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index 05c8a0c44f..cb102e8232 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -5,13 +5,14 @@ icon_state = "floor1" random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7") blood_state = BLOOD_STATE_BLOOD - color = BLOOD_COLOR_HUMAN + color = BLOOD_COLOR_HUMAN //default so we don't have white splotches everywhere. bloodiness = BLOOD_AMOUNT_PER_DECAL - var/data = "" + +/obj/effect/decal/cleanable/blood/old/Initialize(mapload, list/datum/disease/diseases) + . = ..() + update_icon() /obj/effect/decal/cleanable/blood/replace_decal(obj/effect/decal/cleanable/blood/C) - if(!data) - C.data = add_blood_DNA(return_blood_DNA()) if(bloodiness) if(C.bloodiness < MAX_SHOE_BLOODINESS) C.bloodiness += bloodiness @@ -19,7 +20,6 @@ return ..() obj/effect/decal/cleanable/blood/add_blood_DNA(list/blood_dna) - blood_list_checks(src, data["blood_type"]) return TRUE /obj/effect/decal/cleanable/blood/transfer_mob_blood_dna() @@ -27,16 +27,10 @@ obj/effect/decal/cleanable/blood/add_blood_DNA(list/blood_dna) update_icon() /obj/effect/decal/cleanable/blood/update_icon() - for(var/datum/reagent/R in reagents.reagent_list) - // Get blood data from the blood reagent. - if(istype(R, /datum/reagent/blood)) - if(R.data["blood_type"]) - blood_list_checks(src, R.data["blood_type"]) - blood_color = blood_DNA_to_color(blood_mix_types) - else if(istype(R, /datum/reagent/liquidgibs)) - if(R.data["blood_type"]) - blood_list_checks(src, R.data["blood_type"]) - blood_color = blood_DNA_to_color(blood_mix_types) + GET_COMPONENT(D, /datum/component/forensics) + if(!blood_color) + blood_color = D.blood_mix_color + color = blood_color /obj/effect/decal/cleanable/blood/old name = "dried blood" @@ -57,24 +51,12 @@ obj/effect/decal/cleanable/blood/add_blood_DNA(list/blood_dna) desc = "Your instincts say you shouldn't be following these." random_icon_states = null var/list/existing_dirs = list() - blood_state = BLOOD_STATE_BLOOD color = BLOOD_COLOR_HUMAN bloodiness = BLOOD_AMOUNT_PER_DECAL - var/data = "" /obj/effect/decal/cleanable/trail_holder/update_icon() - for(var/datum/reagent/R in reagents.reagent_list) - // Get blood data from the blood reagent. - if(istype(R, /datum/reagent/blood)) - if(R.data["blood_type"]) - blood_list_checks(src, R.data["blood_type"]) - color = blood_DNA_to_color(blood_mix_types) - else if(istype(R, /datum/reagent/liquidgibs)) - if(R.data["blood_type"]) - blood_list_checks(src, R.data["blood_type"]) - color = blood_DNA_to_color(blood_mix_types) - else - color = blood_DNA_to_color() + GET_COMPONENT(D, /datum/component/forensics) + color = D.blood_mix_color /obj/effect/cleanable/trail_holder/Initialize() . = ..() @@ -105,7 +87,6 @@ obj/effect/decal/cleanable/blood/add_blood_DNA(list/blood_dna) var/mob/living/carbon/human/H = O var/obj/item/clothing/shoes/S = H.shoes if(S && S.blood_smear[blood_state]) - S.blood_list_checks(S, data["blood_type"]) S.blood_smear[blood_state] = max(S.blood_smear[blood_state] - BLOOD_LOSS_PER_STEP, 0) shoe_types |= S.type if (!(entered_dirs & H.dir)) @@ -113,8 +94,8 @@ obj/effect/decal/cleanable/blood/add_blood_DNA(list/blood_dna) update_icon() else if(!H.bloodiness) + H.blood_smear[blood_state] = max(S.blood_smear[blood_state] - BLOOD_LOSS_PER_STEP, 0) H.bloodiness = max(H.bloodiness - BLOOD_LOSS_IN_SPREAD, 0) - H.blood_list_checks(H, data["blood_type"]) if (!(entered_dirs & H.dir)) entered_dirs |= H.dir update_icon() @@ -126,7 +107,6 @@ obj/effect/decal/cleanable/blood/add_blood_DNA(list/blood_dna) var/mob/living/carbon/human/H = O var/obj/item/clothing/shoes/S = H.shoes if(S && S.blood_smear[blood_state]) - S.blood_list_checks(S, data["blood_type"]) S.blood_smear[blood_state] = max(S.blood_smear[blood_state] - BLOOD_LOSS_PER_STEP, 0) shoe_types |= S.type if (!(exited_dirs & H.dir)) @@ -134,29 +114,30 @@ obj/effect/decal/cleanable/blood/add_blood_DNA(list/blood_dna) update_icon() else if(!H.bloodiness) + H.blood_smear[blood_state] = max(H.blood_smear[blood_state] - BLOOD_LOSS_PER_STEP, 0) H.bloodiness = max(H.bloodiness - BLOOD_LOSS_IN_SPREAD, 0) - H.blood_list_checks(H, data["blood_type"]) if (!(exited_dirs & H.dir)) exited_dirs |= H.dir update_icon() /obj/effect/decal/cleanable/blood/footprints/tracks/update_icon() + ..() cut_overlays() for(var/Ddir in GLOB.cardinals) + GET_COMPONENT(B, /datum/component/forensics) if(entered_dirs & Ddir) var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["entered-[print_state]-[Ddir]-[color]"] if(!bloodstep_overlay) - GLOB.bloody_footprints_cache["entered-[print_state]-[Ddir]-[color]"] = bloodstep_overlay = image(icon, "[print_state]1", dir = Ddir) + GLOB.bloody_footprints_cache["entered-[print_state]-[Ddir]-[color]"] = bloodstep_overlay = image(icon, "[print_state]1", dir = Ddir, color = B.blood_mix_color) add_overlay(bloodstep_overlay) if(exited_dirs & Ddir) var/image/bloodstep_overlay = GLOB.bloody_footprints_cache["exited-[print_state]-[Ddir]-[color]"] if(!bloodstep_overlay) - GLOB.bloody_footprints_cache["exited-[print_state]-[Ddir]-[color]"] = bloodstep_overlay = image(icon, "[print_state]2", dir = Ddir) + GLOB.bloody_footprints_cache["exited-[print_state]-[Ddir]-[color]"] = bloodstep_overlay = image(icon, "[print_state]2", dir = Ddir, color = B.blood_mix_color) add_overlay(bloodstep_overlay) - alpha = BLOODY_FOOTPRINT_BASE_ALPHA+bloodiness - color = blood_DNA_to_color(blood_mix_types) + alpha = BLOODY_FOOTPRINT_BASE_ALPHA + bloodiness /obj/effect/decal/cleanable/blood/footprints/tracks/examine(mob/user) . = ..() diff --git a/code/game/objects/effects/spawners/gibspawner.dm b/code/game/objects/effects/spawners/gibspawner.dm index cfe0bec455..7e960b5d78 100644 --- a/code/game/objects/effects/spawners/gibspawner.dm +++ b/code/game/objects/effects/spawners/gibspawner.dm @@ -33,29 +33,27 @@ var/list/dna_to_add //find the dna to pass to the spawned gibs. do note this can be null if the mob doesn't have blood. add_blood_DNA() has built in null handling. - to_chat(world, "Attempting to add DNA to pass to gibs") + var/body_coloring if(source_mob) - to_chat(world, "We got a source mob, [source_mob]") dna_to_add = source_mob.get_blood_dna_list() //ez pz + if(ishuman(source_mob)) + var/mob/living/carbon/human/H = source_mob + if(H.dna.species.use_skintones) + body_coloring = skintone2hex(H.skin_tone) + else + body_coloring = "#[H.dna.features["mcolor"]]" + else if(gib_mob_type) - to_chat(world, "We got a mob type, [gib_mob_type]") var/mob/living/temp_mob = new gib_mob_type(src) //generate a fake mob so that we pull the right type of DNA for the gibs. if(gib_mob_species) - to_chat(world, "We got a mob species too, [gib_mob_species]") if(ishuman(temp_mob)) - to_chat(world, "it's a human type mob for sure") var/mob/living/carbon/human/H = temp_mob H.set_species(gib_mob_species) - if(isjellyperson(H)) - H.dna.blood_type = "GEL" - if(isipcperson(H)) - H.dna.blood_type = "HF" - if(isxenoperson(H)) - H.dna.blood_type = "X*" - if(islizard(H)) - H.dna.blood_type = "L" - to_chat(world, "temp_mob is a [H.dna.species]") dna_to_add = temp_mob.get_blood_dna_list() + if(H.dna.species.use_skintones) + body_coloring = skintone2hex(H.skin_tone) + else + body_coloring = "#[H.dna.features["mcolor"]]" qdel(H) else dna_to_add = temp_mob.get_blood_dna_list() @@ -78,6 +76,7 @@ gib.add_blood_DNA(dna_to_add) // color them properly, please. + gib.body_colors = body_coloring gib.update_icon() var/list/directions = gibdirections[i] diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index 5833190d4a..50bfeb1407 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -31,7 +31,7 @@ . += mutable_appearance('icons/effects/item_damage.dmi', "damagedgloves") IF_HAS_BLOOD_DNA(src) GET_COMPONENT(D, /datum/component/forensics) - . += mutable_appearance('icons/effects/blood.dmi', "bloodyhands", color = D.blood_DNA_to_color()) + . += mutable_appearance('icons/effects/blood.dmi', "bloodyhands", color = D.blood_mix_color) /obj/item/clothing/gloves/update_clothes_damaged_state(damaging = TRUE) ..() diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index d4e54de0c7..13f3a81b99 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -19,7 +19,7 @@ . += mutable_appearance('icons/effects/item_damage.dmi', "damagedmask") IF_HAS_BLOOD_DNA(src) GET_COMPONENT(D, /datum/component/forensics) - . += mutable_appearance('icons/effects/blood.dmi', "maskblood", color = D.blood_DNA_to_color()) + . += mutable_appearance('icons/effects/blood.dmi', "maskblood", color = D.blood_mix_color) /obj/item/clothing/mask/equipped(mob/user, slot) ..() diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index b9b37f67b0..c815eae39b 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -52,10 +52,11 @@ if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damagedshoe") if(bloody) + GET_COMPONENT(D, /datum/component/forensics) if(adjusted == NORMAL_STYLE) - . += mutable_appearance('icons/effects/blood.dmi', "shoeblood", color = blood_DNA_to_color(blood_mix_types)) + . += mutable_appearance('icons/effects/blood.dmi', "shoeblood", color = D.blood_mix_color) else - . += mutable_appearance('modular_citadel/icons/mob/digishoes.dmi', "shoeblood", color = blood_DNA_to_color(blood_mix_types)) + . += mutable_appearance('modular_citadel/icons/mob/digishoes.dmi', "shoeblood", color = D.blood_mix_color) /obj/item/clothing/shoes/equipped(mob/user, slot) . = ..() diff --git a/code/modules/clothing/suits/_suits.dm b/code/modules/clothing/suits/_suits.dm index 1f67f93119..3571fe393a 100644 --- a/code/modules/clothing/suits/_suits.dm +++ b/code/modules/clothing/suits/_suits.dm @@ -63,9 +63,9 @@ IF_HAS_BLOOD_DNA(src) GET_COMPONENT(D, /datum/component/forensics) if(taurmode >= SNEK_TAURIC) - . += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood", color = D.blood_DNA_to_color()) + . += mutable_appearance('modular_citadel/icons/mob/64x32_effects.dmi', "[blood_overlay_type]blood", color = D.blood_mix_color) else - . += mutable_appearance('icons/effects/blood.dmi', "[blood_overlay_type]blood", color = D.blood_DNA_to_color()) + . += mutable_appearance('icons/effects/blood.dmi', "[blood_overlay_type]blood", color = D.blood_mix_color) var/mob/living/carbon/human/M = loc if(ishuman(M) && M.w_uniform) var/obj/item/clothing/under/U = M.w_uniform diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index 99c1642f43..df5004a259 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -24,7 +24,7 @@ . += mutable_appearance('icons/effects/item_damage.dmi', "damageduniform") IF_HAS_BLOOD_DNA(src) GET_COMPONENT(D, /datum/component/forensics) - . += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = D.blood_DNA_to_color()) + . += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = D.blood_mix_color) if(accessory_overlay) . += accessory_overlay diff --git a/code/modules/mob/living/carbon/human/human_defines.dm b/code/modules/mob/living/carbon/human/human_defines.dm index 5fb78c0098..be6d2196e0 100644 --- a/code/modules/mob/living/carbon/human/human_defines.dm +++ b/code/modules/mob/living/carbon/human/human_defines.dm @@ -46,7 +46,7 @@ var/bloodiness = 0 var/blood_state = BLOOD_STATE_NOT_BLOODY var/list/blood_smear = list(BLOOD_STATE_BLOOD = 0, BLOOD_STATE_OIL = 0, BLOOD_STATE_NOT_BLOODY = 0) - var/last_blood_DNA = ""//same as last one + var/blood_color //For blood smearing stuff var/name_override //For temporary visible name changes diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index 9b5375035e..2313dace89 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -185,7 +185,7 @@ There are several things that need to be remembered: inv.update_icon() if(!gloves && bloody_hands) - var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER) + var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER, color = blood_color) if(get_num_arms() < 2) if(has_left_hand()) bloody_overlay.icon_state = "bloodyhands_left" diff --git a/code/modules/reagents/chemistry/reagents/other_reagents.dm b/code/modules/reagents/chemistry/reagents/other_reagents.dm index 4622d79777..85d73d6a6e 100644 --- a/code/modules/reagents/chemistry/reagents/other_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/other_reagents.dm @@ -102,12 +102,7 @@ B = new(T) if(!B.reagents) B.reagents.add_reagent("blood", reac_volume) - for(var/datum/reagent/R in B.reagents.reagent_list) - // Get blood data from the blood reagent. - if(istype(R, /datum/reagent/blood)) - if(R.data["blood_type"]) - B.blood_list_checks(src, R.data["blood_type"]) - B.color = B.blood_DNA_to_color(blood_mix_types) + B.update_icon() /datum/reagent/blood/synthetics data = list("donor"=null,"viruses"=null,"blood_DNA"=null, "bloodcolor" = BLOOD_COLOR_SYNTHETIC, "blood_type"="SY","resistances"=null,"trace_chem"=null,"mind"=null,"ckey"=null,"gender"=null,"real_name"=null,"cloneable"=null,"factions"=null) diff --git a/icons/effects/blood.dmi b/icons/effects/blood.dmi index 6ac998d722..4812f95fc8 100644 Binary files a/icons/effects/blood.dmi and b/icons/effects/blood.dmi differ diff --git a/modular_citadel/icons/mob/64x32_effects.dmi b/modular_citadel/icons/mob/64x32_effects.dmi index 7db65a8fc3..a11b3584a3 100644 Binary files a/modular_citadel/icons/mob/64x32_effects.dmi and b/modular_citadel/icons/mob/64x32_effects.dmi differ