From 3877db5769053fa276838320267354dbf3d317f5 Mon Sep 17 00:00:00 2001 From: Nyello Date: Thu, 9 May 2024 15:31:28 +0100 Subject: [PATCH] Makes Wounds Appear on the Health Doll --- code/modules/mob/living/carbon/human/life.dm | 21 ++++++++++++++++++++ html/changelogs/karljohansson-healthdoll.yml | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 html/changelogs/karljohansson-healthdoll.yml diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index a7b098fab6e..3b6d2c8abf0 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -934,6 +934,27 @@ no_damage = 0 health_images += E.get_damage_hud_image() + // Add wound overlays + for(var/obj/item/organ/external/O in organs) + if(O.damage_state == "00") continue + var/cache_index = "[O.damage_state]/[O.icon_name]/[species.blood_color]/[species.get_bodytype()]" + var/list/damage_icon_parts = SSicon_cache.damage_icon_parts + var/icon/DI = damage_icon_parts[cache_index] + if(!DI) + DI = new /icon(species.damage_overlays, O.damage_state) // the damage icon for whole human + DI.Blend(new /icon(species.damage_mask, O.icon_name), ICON_MULTIPLY) // mask with this organ's pixels + DI.Blend(species.blood_color, ICON_MULTIPLY) + damage_icon_parts[cache_index] = DI + health_images += DI + if(O.is_stump()) + continue + var/bandage_icon = species.bandages_icon + if(!bandage_icon) + continue + var/bandage_level = O.bandage_level() + if(bandage_level) + health_images += image(bandage_icon, "[O.icon_name][bandage_level]") + // Apply a fire overlay if we're burning. if(on_fire) var/image/burning_image = image('icons/mob/screen1_health.dmi', "burning", pixel_x = species.healths_overlay_x) diff --git a/html/changelogs/karljohansson-healthdoll.yml b/html/changelogs/karljohansson-healthdoll.yml new file mode 100644 index 00000000000..466c645ca31 --- /dev/null +++ b/html/changelogs/karljohansson-healthdoll.yml @@ -0,0 +1,6 @@ +author: Karl Johansson + +delete-after: True + +changes: + - rscadd: "Added wounds and bandages to the health doll."