mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 10:12:45 +00:00
Updates various dependencies on organ brokenness to use the is_broken() proc. Updates external organ brokenness to ensure broken description is set.
This commit is contained in:
@@ -74,7 +74,7 @@
|
||||
stance_damage += 2
|
||||
else if (E.status & ORGAN_DESTROYED)
|
||||
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.is_usable())
|
||||
stance_damage += 1
|
||||
|
||||
// Canes and crutches help you stand (if the latter is ever added)
|
||||
|
||||
@@ -36,12 +36,8 @@
|
||||
if(istype(src,/mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/M = src
|
||||
for(var/obj/item/organ/external/organ in M.organs)
|
||||
if (!organ)
|
||||
continue
|
||||
else if(organ.status & ORGAN_BROKEN || organ.open)
|
||||
if(organ && (organ.is_broken() || organ.open))
|
||||
src.traumatic_shock += 30
|
||||
if(organ.status & ORGAN_SPLINTED)
|
||||
src.traumatic_shock -= 25
|
||||
|
||||
if(src.traumatic_shock < 0)
|
||||
src.traumatic_shock = 0
|
||||
|
||||
@@ -145,7 +145,7 @@ var/list/organ_cache = list()
|
||||
return damage >= min_bruised_damage
|
||||
|
||||
/obj/item/organ/proc/is_broken()
|
||||
return (damage >= min_broken_damage || (status & ORGAN_CUT_AWAY) || ((status & ORGAN_BROKEN) && !(status & ORGAN_SPLINTED)))
|
||||
return (damage >= min_broken_damage || (status & ORGAN_CUT_AWAY) || (status & ORGAN_BROKEN))
|
||||
|
||||
//Germs
|
||||
/obj/item/organ/proc/handle_antibiotics()
|
||||
|
||||
@@ -333,8 +333,12 @@ This function completely restores a damaged organ to perfect condition.
|
||||
PROCESSING & UPDATING
|
||||
****************************************************/
|
||||
|
||||
//Determines if we even need to process this organ.
|
||||
//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) && !(status & ORGAN_SPLINTED)))
|
||||
|
||||
//Determines if we even need to process this organ.
|
||||
/obj/item/organ/external/proc/need_process()
|
||||
if(status && status != ORGAN_ROBOT) // If it's robotic, that's fine it will have a status.
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user