Skip to content

Commit

Permalink
ci fix
Browse files Browse the repository at this point in the history
  • Loading branch information
harryob committed Aug 30, 2023
1 parent ea92ff9 commit 76024e2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 18 deletions.
24 changes: 19 additions & 5 deletions code/modules/mob/living/carbon/human/update_icons.dm
Original file line number Diff line number Diff line change
Expand Up @@ -137,16 +137,16 @@ There are several things that need to be remembered:
//BASE MOB SPRITE
/mob/living/carbon/human/proc/update_body()
appearance_flags |= KEEP_TOGETHER // sanity

update_damage_overlays()

var/list/new_limbs = list()
for(var/obj/limb/part in limbs)
for(var/obj/limb/part as anything in limbs)
var/bodypart_icon = part.get_limb_icon()
new_limbs += bodypart_icon

remove_overlay(BODYPARTS_LAYER)

if(length(new_limbs))
overlays_standing[BODYPARTS_LAYER] = new_limbs

overlays_standing[BODYPARTS_LAYER] = new_limbs
apply_overlay(BODYPARTS_LAYER)

if(species.flags & HAS_UNDERWEAR)
Expand All @@ -166,6 +166,20 @@ There are several things that need to be remembered:
overlays_standing[UNDERSHIRT_LAYER] = undershirt_icon
apply_overlay(UNDERSHIRT_LAYER)

/mob/living/carbon/human/proc/update_damage_overlays()
remove_overlay(DAMAGE_LAYER)

var/list/damage_overlays = list()
for(var/obj/limb/part as anything in limbs)
if(part.status & LIMB_DESTROYED)
continue

damage_overlays += part.get_damage_overlays()

overlays_standing[DAMAGE_LAYER] = damage_overlays

apply_overlay(DAMAGE_LAYER)

/mob/living/carbon/human/proc/remove_underwear() // :flushed: - geeves
remove_overlay(UNDERSHIRT_LAYER)
remove_overlay(UNDERWEAR_LAYER)
Expand Down
27 changes: 14 additions & 13 deletions code/modules/organs/limbs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -757,19 +757,6 @@ This function completely restores a damaged organ to perfect condition.
. += image('icons/mob/humans/dam_human.dmi', "stump_[icon_name]_blood", -DAMAGE_LAYER, image_dir)
return

damage_state = damage_state_text()
var/brutestate = copytext(damage_state, 1, 2)
if(brutestate != "0")
wound_overlay.dir = image_dir
wound_overlay.icon_state = "grayscale_[brutestate]"
. += wound_overlay

var/burnstate = copytext(damage_state, 2)
if(burnstate != "0")
burn_overlay.dir = image_dir
burn_overlay.icon_state = "burn_[burnstate]"
. += burn_overlay

var/image/limb = image(layer = -BODYPARTS_LAYER, dir = image_dir)

var/race_icon = owner.species.icobase
Expand Down Expand Up @@ -1311,6 +1298,20 @@ treat_grafted var tells it to apply to grafted but unsalved wounds, for burn kit
owner.incision_depths[name] = SURGERY_DEPTH_SURFACE
owner.active_surgeries[name] = null

/obj/limb/proc/get_damage_overlays()
. = list()

damage_state = damage_state_text()
var/brutestate = copytext(damage_state, 1, 2)
if(brutestate != "0")
wound_overlay.icon_state = "grayscale_[brutestate]"
. += wound_overlay

var/burnstate = copytext(damage_state, 2)
if(burnstate != "0")
burn_overlay.icon_state = "burn_[burnstate]"
. += wound_overlay

/*
LIMB TYPES
*/
Expand Down

0 comments on commit 76024e2

Please sign in to comment.