mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2026-01-06 07:22:42 +00:00
Fixes IPCs getting fleshy stumps, makes robot limbs become unusable above max_damage
This commit is contained in:
@@ -70,9 +70,9 @@
|
||||
|
||||
for(var/limb_tag in list("l_leg","r_leg","l_foot","r_foot"))
|
||||
var/obj/item/organ/external/E = organs_by_name[limb_tag]
|
||||
if(!E || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD)))
|
||||
stance_damage += 2 // let it fail even if just foot&leg
|
||||
else if (E.is_malfunctioning() || E.is_broken() || !E.is_usable())
|
||||
if(!E || (E.status & (ORGAN_DESTROYED|ORGAN_DEAD)) || E.is_malfunctioning())
|
||||
stance_damage += 2 // let it fail even if just foot&leg. Also malfunctioning happens sporadically so it should impact more when it procs
|
||||
else if (E.is_broken() || !E.is_usable())
|
||||
stance_damage += 1
|
||||
else if (E.is_dislocated())
|
||||
stance_damage += 0.5
|
||||
|
||||
@@ -388,10 +388,6 @@ This function completely restores a damaged organ to perfect condition.
|
||||
if(trace_chemicals[chemID] <= 0)
|
||||
trace_chemicals.Remove(chemID)
|
||||
|
||||
//Bone fractures
|
||||
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
|
||||
src.fracture()
|
||||
|
||||
if(!(status & ORGAN_BROKEN))
|
||||
perma_injury = 0
|
||||
|
||||
@@ -562,6 +558,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
if(istype(owner,/mob/living/carbon/human))
|
||||
H = owner
|
||||
|
||||
//update damage counts
|
||||
for(var/datum/wound/W in wounds)
|
||||
if(!W.internal) //so IB doesn't count towards crit/paincrit
|
||||
if(W.damage_type == CUT || W.damage_type == BRUISE)
|
||||
@@ -577,9 +574,13 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
|
||||
number_wounds += W.amount
|
||||
|
||||
if (open && !clamped && (H && !(H.species.flags & NO_BLOOD))) //things tend to bleed if they are CUT OPEN
|
||||
//things tend to bleed if they are CUT OPEN
|
||||
if (open && !clamped && (H && !(H.species.flags & NO_BLOOD)))
|
||||
status |= ORGAN_BLEEDING
|
||||
|
||||
|
||||
//Bone fractures
|
||||
if(config.bones_can_break && brute_dam > min_broken_damage * config.organ_health_multiplier && !(status & ORGAN_ROBOT))
|
||||
src.fracture()
|
||||
|
||||
// new damage icon system
|
||||
// adjusted to set damage_state to brute/burn code only (without r_name0 as before)
|
||||
@@ -850,6 +851,8 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
return 0
|
||||
|
||||
/obj/item/organ/external/proc/is_usable()
|
||||
if((status & ORGAN_ROBOT) && get_damage() >= max_damage) //robot limbs just become inoperable at max damage
|
||||
return
|
||||
return !is_dislocated() && !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
|
||||
|
||||
/obj/item/organ/external/proc/is_malfunctioning()
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
..(holder, internal)
|
||||
if(istype(limb))
|
||||
max_damage = limb.max_damage
|
||||
if((limb.status & ORGAN_ROBOT) && (!parent || (parent.status & ORGAN_ROBOT)))
|
||||
status |= ORGAN_ROBOT //if both limb and the parent are robotic, the stump is robotic too
|
||||
|
||||
/obj/item/organ/external/stump/is_stump()
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user