From a37c3a87212477ae7e0cfe99f21800aeb9f24d56 Mon Sep 17 00:00:00 2001 From: deathride58 Date: Wed, 25 May 2022 03:25:20 -0400 Subject: [PATCH] multiplicative blood - makes the majority of blood visuals use multiplicative blending --- code/datums/mutable_appearance.dm | 3 ++- code/game/objects/effects/decals/cleanable/humans.dm | 2 ++ 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 +- code/modules/mob/living/carbon/human/update_icons.dm | 2 +- 10 files changed, 12 insertions(+), 9 deletions(-) diff --git a/code/datums/mutable_appearance.dm b/code/datums/mutable_appearance.dm index 968809747b..b04f55ef0e 100644 --- a/code/datums/mutable_appearance.dm +++ b/code/datums/mutable_appearance.dm @@ -10,7 +10,7 @@ // And yes this does have to be in the constructor, BYOND ignores it if you set it as a normal var // Helper similar to image() -/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, alpha = 255, appearance_flags = NONE, color = "#FFFFFF") +/proc/mutable_appearance(icon, icon_state = "", layer = FLOAT_LAYER, plane = FLOAT_PLANE, alpha = 255, appearance_flags = NONE, color = "#FFFFFF", blend_mode = BLEND_DEFAULT) var/mutable_appearance/MA = new() MA.icon = icon MA.icon_state = icon_state @@ -19,5 +19,6 @@ MA.alpha = alpha MA.appearance_flags |= appearance_flags MA.color = color + MA.blend_mode = blend_mode return MA diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index df66bd76e2..6f64849be7 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -3,6 +3,7 @@ desc = "It's gooey. Perhaps it's the chef's cooking?" icon = 'icons/effects/blood.dmi' icon_state = "floor1" + blend_mode = BLEND_MULTIPLY random_icon_states = list("floor1", "floor2", "floor3", "floor4", "floor5", "floor6", "floor7") blood_state = BLOOD_STATE_BLOOD bloodiness = BLOOD_AMOUNT_PER_DECAL @@ -83,6 +84,7 @@ name = "blood" icon = 'icons/effects/blood.dmi' desc = "Your instincts say you shouldn't be following these." + blend_mode = BLEND_MULTIPLY random_icon_states = null beauty = -50 persistent = TRUE diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index 4b558d6604..7e9f35c8c3 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -32,7 +32,7 @@ if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damagedgloves") if(blood_DNA) - . += mutable_appearance('icons/effects/blood.dmi', "bloodyhands", color = blood_DNA_to_color()) + . += mutable_appearance('icons/effects/blood.dmi', "bloodyhands", color = blood_DNA_to_color(), blend_mode = BLEND_MULTIPLY) /obj/item/clothing/gloves/update_clothes_damaged_state() ..() diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm index 29a07fd177..a392d48951 100644 --- a/code/modules/clothing/head/_head.dm +++ b/code/modules/clothing/head/_head.dm @@ -55,7 +55,7 @@ if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damagedhelmet") if(blood_DNA) - . += mutable_appearance('icons/effects/blood.dmi', "helmetblood", color = blood_DNA_to_color()) + . += mutable_appearance('icons/effects/blood.dmi', "helmetblood", color = blood_DNA_to_color(), blend_mode = BLEND_MULTIPLY) /obj/item/clothing/head/update_clothes_damaged_state() ..() diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index cca13ce1d8..d19e0cef37 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -36,7 +36,7 @@ if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damagedmask") if(blood_DNA) - . += mutable_appearance('icons/effects/blood.dmi', "maskblood", color = blood_DNA_to_color()) + . += mutable_appearance('icons/effects/blood.dmi', "maskblood", color = blood_DNA_to_color(), blend_mode = BLEND_MULTIPLY) /obj/item/clothing/mask/update_clothes_damaged_state() ..() diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index 4f852fb301..d19b8ae1d3 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -13,7 +13,7 @@ if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damagedmask") if(blood_DNA) - . += mutable_appearance('icons/effects/blood.dmi', "maskblood", color = blood_DNA_to_color()) + . += mutable_appearance('icons/effects/blood.dmi', "maskblood", color = blood_DNA_to_color(), blend_mode = BLEND_MULTIPLY) /obj/item/clothing/neck/tie name = "tie" diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index d8ac875df5..b94c555452 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -82,7 +82,7 @@ . += mutable_appearance('icons/effects/item_damage.dmi', "damagedshoe") if(bloody) var/file2use = style_flags & STYLE_DIGITIGRADE ? 'icons/mob/clothing/feet_digi.dmi' : 'icons/effects/blood.dmi' - . += mutable_appearance(file2use, "shoeblood", color = blood_DNA_to_color()) + . += mutable_appearance(file2use, "shoeblood", color = blood_DNA_to_color(), blend_mode = BLEND_MULTIPLY) /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 fa4614429c..1b786ded05 100644 --- a/code/modules/clothing/suits/_suits.dm +++ b/code/modules/clothing/suits/_suits.dm @@ -20,7 +20,7 @@ . += mutable_appearance('icons/effects/item_damage.dmi', "damaged[blood_overlay_type]") if(blood_DNA) var/file2use = (style_flags & STYLE_ALL_TAURIC) ? 'modular_citadel/icons/mob/64x32_effects.dmi' : 'icons/effects/blood.dmi' - . += mutable_appearance(file2use, "[blood_overlay_type]blood", color = blood_DNA_to_color()) + . += mutable_appearance(file2use, "[blood_overlay_type]blood", color = blood_DNA_to_color(), blend_mode = BLEND_MULTIPLY) 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 e806ebf906..ce29c1248e 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -29,7 +29,7 @@ if(damaged_clothes) . += mutable_appearance('icons/effects/item_damage.dmi', "damageduniform") if(blood_DNA) - . += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = blood_DNA_to_color()) + . += mutable_appearance('icons/effects/blood.dmi', "uniformblood", color = blood_DNA_to_color(), blend_mode = BLEND_MULTIPLY) if(accessory_overlay) . += accessory_overlay diff --git a/code/modules/mob/living/carbon/human/update_icons.dm b/code/modules/mob/living/carbon/human/update_icons.dm index cb2458e376..b99542b314 100644 --- a/code/modules/mob/living/carbon/human/update_icons.dm +++ b/code/modules/mob/living/carbon/human/update_icons.dm @@ -209,7 +209,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, color = blood_DNA_to_color()) + var/mutable_appearance/bloody_overlay = mutable_appearance('icons/effects/blood.dmi', "bloodyhands", -GLOVES_LAYER, color = blood_DNA_to_color(), blend_mode = BLEND_MULTIPLY) if(get_num_arms(FALSE) < 2) if(has_left_hand(FALSE)) bloody_overlay.icon_state = "bloodyhands_left"