mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-23 04:51:32 +01:00
Clarified extreme wounds may require amputation (#21756)
Also ensured critical limbs (the torso and head) cannot be ruined like this. <img width="876" height="448" alt="image" src="https://github.com/user-attachments/assets/ce6cd6c6-7130-48ff-a107-1d8b8dd70b91" />
This commit is contained in:
@@ -306,6 +306,12 @@
|
||||
|
||||
for(var/obj/item/organ/external/temp in organs)
|
||||
if(temp)
|
||||
if(temp.CheckNeedsAmputation())
|
||||
var/damage_descriptor = "mangled"
|
||||
if(!(temp.burn_ratio < 100))
|
||||
damage_descriptor = "charred"
|
||||
wound_flavor_text["[temp.name]"] = SPAN_DANGER("<b>[get_pronoun("He")] [get_pronoun("has")] \a [temp.name] that is [damage_descriptor] beyond recognition.</b>\n")
|
||||
continue//If it's this bad, we don't care about the rest of the wounds. The limb is gone.
|
||||
var/body_part = temp.body_part
|
||||
if(temp.body_part & HEAD)
|
||||
body_part &= ~HEAD
|
||||
|
||||
@@ -75,7 +75,7 @@
|
||||
/obj/item/organ/internal/proc/get_scarring_results()
|
||||
var/scar_level = get_scarring_level()
|
||||
if(scar_level > 0.01)
|
||||
. += "[get_wound_severity(get_scarring_level())] scarring"
|
||||
. += "[get_wound_severity(get_scarring_level(), FALSE, FALSE)] scarring"
|
||||
|
||||
/obj/item/organ/internal/is_usable()
|
||||
if(robotize_type)
|
||||
|
||||
@@ -268,6 +268,17 @@
|
||||
/obj/item/organ/external/proc/invalidate_marking_cache()
|
||||
cached_markings = null
|
||||
|
||||
///If the organ requires amputation, returns TRUE. Otherwise, returns FALSE
|
||||
/obj/item/organ/external/proc/CheckNeedsAmputation()
|
||||
var/extreme_damage = FALSE
|
||||
if(!(brute_ratio < 100))
|
||||
extreme_damage = TRUE
|
||||
if(!(burn_ratio < 100))
|
||||
extreme_damage = TRUE
|
||||
if(extreme_damage && !(limb_flags & ORGAN_HEALS_OVERKILL))
|
||||
return TRUE // Limb took too much damage, nothing left to heal
|
||||
return FALSE
|
||||
|
||||
/obj/item/organ/external/attack_self(var/mob/user)
|
||||
if(!length(contents))
|
||||
return ..()
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
body_part = UPPER_TORSO
|
||||
vital = TRUE
|
||||
parent_organ = null
|
||||
limb_flags = 0
|
||||
limb_flags = ORGAN_HEALS_OVERKILL
|
||||
dislocated = -1
|
||||
joint = "structural ligament"
|
||||
amputation_point = "branch"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
artery_name = "internal thoracic artery"
|
||||
dislocated = -1
|
||||
gendered_icon = 1
|
||||
limb_flags = ORGAN_CAN_BREAK
|
||||
limb_flags = ORGAN_CAN_BREAK | ORGAN_HEALS_OVERKILL
|
||||
parent_organ = null
|
||||
encased = "ribcage"
|
||||
augment_limit = 3
|
||||
@@ -240,6 +240,7 @@
|
||||
gendered_icon = 1
|
||||
encased = "skull"
|
||||
augment_limit = 3
|
||||
limb_flags = ORGAN_CAN_AMPUTATE | ORGAN_CAN_BREAK | ORGAN_CAN_MAIM | ORGAN_HEALS_OVERKILL
|
||||
var/can_intake_reagents = 1
|
||||
|
||||
/obj/item/organ/external/head/body_part_class()
|
||||
|
||||
@@ -177,11 +177,10 @@
|
||||
/datum/wound/proc/heal_damage(amount)
|
||||
if(LAZYLEN(embedded_objects))
|
||||
return amount // heal nothing
|
||||
if(parent_organ)
|
||||
if (damage_type == INJURY_TYPE_BURN && !(parent_organ.burn_ratio < 100))
|
||||
return amount // We don't want to heal wounds on irreparable organs
|
||||
else if(!(parent_organ.brute_ratio < 100))
|
||||
return amount
|
||||
if (parent_organ \
|
||||
&& ((damage_type == INJURY_TYPE_BURN && !(parent_organ.burn_ratio < 100 || (parent_organ.limb_flags & ORGAN_HEALS_OVERKILL)))\
|
||||
|| !(parent_organ.brute_ratio < 100 || (parent_organ.limb_flags & ORGAN_HEALS_OVERKILL))))
|
||||
return amount // We don't want to heal wounds on irreparable organs
|
||||
|
||||
var/healed_damage = min(src.damage, amount)
|
||||
amount -= healed_damage
|
||||
|
||||
Reference in New Issue
Block a user