Files
1467508036 Teshari Specific Limb Damage States and Bloody Clothing (#6038)
## About The Pull Request
Teshari have long had to deal with ill-fitting overlays applied to them.
I have chosen to bite the bullet and do the labour by creating species
specific states for:
- bloody clothes
- damaged clothes
- body wounds
- bleeding animations

How it works is simple: if our icon override exists for our species, we
use it. If it doesn't exist, we default back to the original. What this
means is that future species overrides can be added without code
changes.

## Why It's Good For The Game
<img width="91" height="85" alt="image"
src="https://github.com/user-attachments/assets/30f1c91a-27aa-441e-9026-8d441855e7b9"
/>

This sucks! They look like they're wearing clown shoes for crying out
loud!


<img width="88" height="91" alt="image"
src="https://github.com/user-attachments/assets/0aa2febd-728b-4108-b64d-56173958cf27"
/>

This doesn't suck!

</details>

## Changelog

🆑 Robwo
fix: Teshari can now get properly bloody and bruised.
/🆑

---------

Co-authored-by: Alexis <catmc8565@gmail.com>
Co-authored-by: Waterpig <49160555+Maia-J@users.noreply.github.com>
2026-08-15 18:12:22 +02:00

66 lines
2.7 KiB
Plaintext

/obj/item/clothing/suit
name = "suit"
icon = 'icons/obj/clothing/suits/default.dmi'
lefthand_file = 'icons/mob/inhands/clothing/suits_lefthand.dmi'
righthand_file = 'icons/mob/inhands/clothing/suits_righthand.dmi'
abstract_type = /obj/item/clothing/suit
var/fire_resist = T0C+100
allowed = list(
/obj/item/tank/internals/emergency_oxygen,
/obj/item/tank/internals/plasmaman,
/obj/item/tank/jetpack/captain,
/obj/item/storage/belt/holster,
)
armor_type = /datum/armor/none
drop_sound = 'sound/items/handling/cloth/cloth_drop1.ogg'
pickup_sound = 'sound/items/handling/cloth/cloth_pickup1.ogg'
slot_flags = ITEM_SLOT_OCLOTHING
var/blood_overlay_type = "suit"
limb_integrity = 0 // disabled for most exo-suits
/obj/item/clothing/suit/worn_overlays(mutable_appearance/standing, isinhands = FALSE, icon_file, bodyshape = NONE)
. = ..()
if(isinhands)
return
//BUBBER EDIT BEGIN - Species specific damage states.
var/mob/living/carbon/human/wearer = loc
if(damaged_clothes)
//. += mutable_appearance('icons/effects/item_damage.dmi', "damaged[blood_overlay_type]") //ORIGINAL
//todo: the taur icon doesn't exist anymore. Needs replacement.
var/icon/damage_icon_file = (bodyshape & STYLE_TAUR_ALL) ? 'modular_skyrat/master_files/icons/mob/64x32_item_damage.dmi' : 'icons/effects/item_damage.dmi'
var/damage_icon_state = "damaged[blood_overlay_type]"
if(ishuman(wearer) && icon_exists('modular_zubbers/icons/effects/item_damage_species.dmi', "damaged[blood_overlay_type]_[wearer.dna.species.id]"))
damage_icon_file = 'modular_zubbers/icons/effects/item_damage_species.dmi'
damage_icon_state = "damaged[blood_overlay_type]_[wearer.dna.species.id]"
. += mutable_appearance(damage_icon_file, damage_icon_state)
//BUBBER EDIT END
if(!ishuman(wearer) || !wearer.w_uniform)
return
var/obj/item/clothing/under/undershirt = wearer.w_uniform
if(!istype(undershirt))
return
for(var/obj/item/clothing/accessory/accessory as anything in undershirt.attached_accessories)
if (accessory.above_suit)
. += accessory.generate_accessory_overlay(undershirt)
/obj/item/clothing/suit/separate_worn_overlays(mutable_appearance/standing, mutable_appearance/draw_target, isinhands = FALSE, icon_file, bodyshape = NONE)
. = ..()
if (isinhands)
return
var/blood_overlay = get_blood_overlay(blood_overlay_type, bodyshape)
if (blood_overlay)
. += blood_overlay
/obj/item/clothing/suit/update_clothes_damaged_state(damaged_state = CLOTHING_DAMAGED)
..()
if(ismob(loc))
var/mob/M = loc
M.update_worn_oversuit()
/obj/item/clothing/suit/generate_digitigrade_icons(icon/base_icon, greyscale_colors)
var/icon/legs = icon(SSgreyscale.GetColoredIconByType(/datum/greyscale_config/digitigrade, greyscale_colors), "oversuit_worn")
return replace_icon_legs(base_icon, legs)