Merge pull request #4929 from Anewbe/splints

Splints no longer perfectly prevent negative effects from broken bones
This commit is contained in:
Atermonera
2018-02-24 22:52:25 -08:00
committed by GitHub
4 changed files with 42 additions and 5 deletions
@@ -35,7 +35,7 @@
var/obj/item/organ/external/E = get_organ(organ_name)
if(!E || E.is_stump())
tally += 4
else if(E.splinted)
else if(E.splinted && E.splinted.loc != E)
tally += 0.5
else if(E.status & ORGAN_BROKEN)
tally += 1.5
@@ -47,7 +47,7 @@
var/obj/item/organ/external/E = get_organ(organ_name)
if(!E || E.is_stump())
tally += 4
else if(E.splinted)
else if(E.splinted && E.splinted.loc != E)
tally += 0.5
else if(E.status & ORGAN_BROKEN)
tally += 1.5
+2 -2
View File
@@ -526,10 +526,10 @@
for(var/name in H.organs_by_name)
var/obj/item/organ/external/e = H.organs_by_name[name]
if(e && H.lying)
if(((e.status & ORGAN_BROKEN && !(e.splinted)) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
if((e.status & ORGAN_BROKEN && (!e.splinted || (e.splinted && e.splinted in e.contents && prob(30))) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
return 1
break
return 0
return 0
/mob/MouseDrop(mob/M as mob)
..()
+1 -1
View File
@@ -543,7 +543,7 @@ This function completely restores a damaged organ to perfect condition.
//external organs handle brokenness a bit differently when it comes to damage. Instead brute_dam is checked inside process()
//this also ensures that an external organ cannot be "broken" without broken_description being set.
/obj/item/organ/external/is_broken()
return ((status & ORGAN_CUT_AWAY) || ((status & ORGAN_BROKEN) && !(splinted)))
return ((status & ORGAN_CUT_AWAY) || (status & ORGAN_BROKEN) && (!splinted || (splinted && splinted in src.contents && prob(30))))
//Determines if we even need to process this organ.
/obj/item/organ/external/proc/need_process()