mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-20 12:29:23 +01:00
Persistent Bandages (#20268)
* Bandages now do not disappear as damage heals, instead, a special Remove Bandages verb must be used to remove bandages. This cannot be used to re-open wounds for now, and can only be used if the bandage would've downgraded / disappeared at that point. * Taking damage on a bandaged limb now removes the bandages.
This commit is contained in:
@@ -153,6 +153,9 @@
|
||||
var/body_hair
|
||||
var/painted = 0
|
||||
|
||||
/// The amount of bandages on our sprite
|
||||
var/bandage_level = BANDAGE_LEVEL_NONE
|
||||
|
||||
///For special projectile gibbing calculation, dubbed "maiming"
|
||||
var/maim_bonus = 0
|
||||
|
||||
@@ -455,8 +458,6 @@
|
||||
update_damages()
|
||||
if(owner)
|
||||
owner.updatehealth() //droplimb will call updatehealth() again if it does end up being called
|
||||
if(status & ORGAN_BLEEDING)
|
||||
owner.update_bandages()
|
||||
|
||||
return update_icon()
|
||||
|
||||
@@ -603,8 +604,10 @@ This function completely restores a damaged organ to perfect condition.
|
||||
//Possibly trigger an internal wound, too.
|
||||
var/local_damage = brute_dam + burn_dam + damage
|
||||
|
||||
var/is_burn_type_damage = (type in list(DAMAGE_BURN, LASER))
|
||||
|
||||
if(damage > (min_broken_damage / 2) && local_damage > min_broken_damage && !(status & ORGAN_ROBOT))
|
||||
if(!(type in list(DAMAGE_BURN, LASER)))
|
||||
if(!is_burn_type_damage)
|
||||
if(prob(damage) && sever_artery())
|
||||
owner.custom_pain("You feel something rip in your [name]!", 25)
|
||||
|
||||
@@ -616,7 +619,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
tendon.damage(new_brute)
|
||||
|
||||
//Burn damage can cause fluid loss due to blistering and cook-off
|
||||
if((type in list(DAMAGE_BURN, LASER)) && (damage > 5 || damage + burn_dam >= 15) && !BP_IS_ROBOTIC(src))
|
||||
if(is_burn_type_damage && (damage > 5 || damage + burn_dam >= 15) && !BP_IS_ROBOTIC(src))
|
||||
var/fluid_loss_severity
|
||||
switch(type)
|
||||
if(DAMAGE_BURN)
|
||||
@@ -638,6 +641,12 @@ This function completely restores a damaged organ to perfect condition.
|
||||
if(compatible_wounds.len)
|
||||
var/datum/wound/W = pick(compatible_wounds)
|
||||
W.open_wound(damage)
|
||||
|
||||
if(bandage_level)
|
||||
owner.visible_message(SPAN_WARNING("The bandages on [owner.name]'s [name] gets [is_burn_type_damage ? "burnt" : "ripped"] off!"), SPAN_WARNING("The bandages on your [name] gets [is_burn_type_damage ? "burnt" : "ripped"] off!"))
|
||||
bandage_level = BANDAGE_LEVEL_NONE
|
||||
owner.update_bandages()
|
||||
|
||||
if(prob(25))
|
||||
if(status & ORGAN_ROBOT)
|
||||
owner.visible_message(SPAN_WARNING("The damage to [owner.name]'s [name] worsens."),\
|
||||
@@ -647,6 +656,7 @@ This function completely restores a damaged organ to perfect condition.
|
||||
owner.visible_message(SPAN_WARNING("The wound on [owner.name]'s [name] widens with a nasty ripping noise."),\
|
||||
SPAN_WARNING("The wound on your [name] widens with a nasty ripping noise."),\
|
||||
"You hear a nasty ripping noise, as if flesh is being torn apart.")
|
||||
|
||||
return
|
||||
|
||||
//Creating wound
|
||||
@@ -664,6 +674,11 @@ This function completely restores a damaged organ to perfect condition.
|
||||
if(W)
|
||||
wounds += W
|
||||
|
||||
if(bandage_level)
|
||||
owner.visible_message(SPAN_WARNING("The bandages on [owner.name]'s [name] gets [is_burn_type_damage ? "burnt" : "ripped"] off!"), SPAN_WARNING("The bandages on your [name] gets [is_burn_type_damage ? "burnt" : "ripped"] off!"))
|
||||
bandage_level = BANDAGE_LEVEL_NONE
|
||||
owner.update_bandages()
|
||||
|
||||
/****************************************************
|
||||
PROCESSING & UPDATING
|
||||
****************************************************/
|
||||
|
||||
@@ -348,16 +348,17 @@ var/list/robot_hud_colours = list("#ffffff","#cccccc","#aaaaaa","#888888","#6666
|
||||
hud_damage_image.color = hud_colours[max(1,min(Ceiling(dam_state*hud_colours.len),hud_colours.len))]
|
||||
return hud_damage_image
|
||||
|
||||
/obj/item/organ/external/proc/bandage_level()
|
||||
/// Returns the possible bandage level the external can have right now, see medical.dm for usage
|
||||
/obj/item/organ/external/proc/possible_bandage_level()
|
||||
if(damage_state_text() == "00")
|
||||
return 0
|
||||
return BANDAGE_LEVEL_NONE
|
||||
if(!is_bandaged())
|
||||
return 0
|
||||
return BANDAGE_LEVEL_NONE
|
||||
if(burn_dam + brute_dam == 0)
|
||||
. = 0
|
||||
. = BANDAGE_LEVEL_NONE
|
||||
else if (burn_dam + brute_dam < (max_damage * 0.25 / 2))
|
||||
. = 1
|
||||
. = BANDAGE_LEVEL_LIGHT
|
||||
else if (burn_dam + brute_dam < (max_damage * 0.75 / 2))
|
||||
. = 2
|
||||
. = BANDAGE_LEVEL_MEDIUM
|
||||
else
|
||||
. = 3
|
||||
. = BANDAGE_LEVEL_HEAVY
|
||||
|
||||
@@ -185,6 +185,8 @@
|
||||
src.desc = desc_list[current_stage]
|
||||
src.min_damage = damage_list[current_stage]
|
||||
|
||||
src.bandaged = FALSE
|
||||
|
||||
// returns whether this wound can absorb the given amount of damage.
|
||||
// this will prevent large amounts of damage being trapped in less severe wound types
|
||||
/datum/wound/proc/can_worsen(damage_type, damage)
|
||||
|
||||
Reference in New Issue
Block a user