Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makes Wounds Appear on the Health Doll #19111

Merged
merged 1 commit into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions code/modules/mob/living/carbon/human/life.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 6 additions & 0 deletions html/changelogs/karljohansson-healthdoll.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
author: Karl Johansson

delete-after: True

changes:
- rscadd: "Added wounds and bandages to the health doll."
Loading