mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-22 03:27:46 +01:00
Some dislocation fixes/adjustments.
This commit is contained in:
@@ -308,7 +308,7 @@
|
||||
if(!target_zone)
|
||||
return null
|
||||
var/obj/item/organ/external/organ = get_organ(check_zone(target_zone))
|
||||
if(!organ || organ.is_dislocated() || organ.dislocated == -1)
|
||||
if(!organ || (organ.dislocated == 2) || (organ.dislocated == -1))
|
||||
return null
|
||||
var/dislocation_str
|
||||
if(prob(W.force))
|
||||
|
||||
@@ -70,12 +70,12 @@
|
||||
|
||||
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)
|
||||
stance_damage += 2
|
||||
else if (E.status & ORGAN_DESTROYED)
|
||||
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.status & ORGAN_SPLINTED)) || !E.is_usable())
|
||||
else if (E.is_malfunctioning() || (E.is_broken() && !(E.status & ORGAN_SPLINTED)) || (E.status & ORGAN_MUTATED))
|
||||
stance_damage += 1
|
||||
else if (E.is_dislocated())
|
||||
stance_damage += 0.5
|
||||
|
||||
// Canes and crutches help you stand (if the latter is ever added)
|
||||
// One cane mitigates a broken leg+foot, or a missing foot.
|
||||
@@ -102,7 +102,7 @@
|
||||
if(!E || !E.can_grasp || (E.status & ORGAN_SPLINTED))
|
||||
continue
|
||||
|
||||
if(E.is_broken())
|
||||
if(E.is_broken() || E.is_dislocated())
|
||||
if(E.body_part == HAND_LEFT)
|
||||
if(!l_hand)
|
||||
continue
|
||||
|
||||
@@ -389,7 +389,7 @@
|
||||
// Lung damage increases the minimum safe pressure.
|
||||
if(species.has_organ["lungs"])
|
||||
var/obj/item/organ/lungs/L = internal_organs_by_name["lungs"]
|
||||
if(!L)
|
||||
if(isnull(L))
|
||||
safe_pressure_min = INFINITY //No lungs, how are you breathing?
|
||||
else if(L.is_broken())
|
||||
safe_pressure_min *= 1.5
|
||||
|
||||
@@ -96,9 +96,14 @@
|
||||
dislocated = 0
|
||||
if(children && children.len)
|
||||
for(var/obj/item/organ/external/child in children)
|
||||
child.undislocate()
|
||||
if(child.dislocated == 1)
|
||||
child.undislocate()
|
||||
if(owner)
|
||||
owner.shock_stage += 20
|
||||
for(var/obj/item/organ/external/limb in owner.organs)
|
||||
if(limb.dislocated == 2)
|
||||
return
|
||||
owner.verbs -= /mob/living/carbon/human/proc/undislocate
|
||||
|
||||
/obj/item/organ/external/update_health()
|
||||
damage = min(max_damage, (brute_dam + burn_dam))
|
||||
@@ -837,7 +842,7 @@ Note that amputating the affected organ does in fact remove the infection from t
|
||||
return 0
|
||||
|
||||
/obj/item/organ/external/proc/is_usable()
|
||||
return !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
|
||||
return !is_dislocated() && !(status & (ORGAN_DESTROYED|ORGAN_MUTATED|ORGAN_DEAD))
|
||||
|
||||
/obj/item/organ/external/proc/is_malfunctioning()
|
||||
return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam))
|
||||
|
||||
Reference in New Issue
Block a user