diff --git a/code/__defines/damage_organs.dm b/code/__defines/damage_organs.dm index 124be53452..3c0e190427 100644 --- a/code/__defines/damage_organs.dm +++ b/code/__defines/damage_organs.dm @@ -35,9 +35,8 @@ #define ORGAN_BLEEDING (1<<1) #define ORGAN_BROKEN (1<<2) #define ORGAN_DESTROYED (1<<3) -#define ORGAN_SPLINTED (1<<4) -#define ORGAN_DEAD (1<<5) -#define ORGAN_MUTATED (1<<6) +#define ORGAN_DEAD (1<<4) +#define ORGAN_MUTATED (1<<5) #define DROPLIMB_EDGE 0 #define DROPLIMB_BLUNT 1 diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 9d90f018ef..022ce367f0 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -329,7 +329,7 @@ organStatus["broken"] = E.broken_description if(E.status & ORGAN_ROBOT) organStatus["robotic"] = 1 - if(E.status & ORGAN_SPLINTED) + if(E.splinted) organStatus["splinted"] = 1 if(E.status & ORGAN_BLEEDING) organStatus["bleeding"] = 1 @@ -483,7 +483,7 @@ break if(istype(e, /obj/item/organ/external/chest) && occupant.is_lung_ruptured()) lung_ruptured = "Lung ruptured:" - if(e.status & ORGAN_SPLINTED) + if(e.splinted) splint = "Splinted:" if(e.status & ORGAN_BLEEDING) bled = "Bleeding:" diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index 9f0843e134..bc05306282 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -161,7 +161,7 @@ REAGENT SCANNER continue var/limb = e.name if(e.status & ORGAN_BROKEN) - if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!(e.status & ORGAN_SPLINTED))) + if(((e.name == "l_arm") || (e.name == "r_arm") || (e.name == "l_leg") || (e.name == "r_leg")) && (!e.splinted)) user << "Unsecured fracture in subject [limb]. Splinting recommended for transport." if(e.has_infected_wound()) user << "Infected wound detected in subject [limb]. Disinfection recommended." diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm index 74c8f006ae..41ae7ac7c3 100644 --- a/code/game/objects/items/stacks/medical.dm +++ b/code/game/objects/items/stacks/medical.dm @@ -264,7 +264,7 @@ if(!(affecting.organ_tag in splintable_organs)) user << "You can't use \the [src] to apply a splint there!" return - if(affecting.status & ORGAN_SPLINTED) + if(affecting.splinted) user << "[M]'s [limb] is already splinted!" return if (M != user) diff --git a/code/modules/clothing/spacesuits/spacesuits.dm b/code/modules/clothing/spacesuits/spacesuits.dm index 6582cd4e68..b5e2d538f1 100644 --- a/code/modules/clothing/spacesuits/spacesuits.dm +++ b/code/modules/clothing/spacesuits/spacesuits.dm @@ -82,7 +82,7 @@ if(user.wear_suit == src) for(var/obj/item/organ/external/E in user.organs) - if(E.apply_splint(src)) + if(E.is_broken() && E.apply_splint(src)) user << "You feel [src] constrict about your [E.name], supporting it." supporting_limbs |= E else diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm index 7d9712277c..1394b86b4a 100644 --- a/code/modules/mob/living/carbon/human/examine.dm +++ b/code/modules/mob/living/carbon/human/examine.dm @@ -251,8 +251,8 @@ //splints for(var/organ in list(BP_L_LEG, BP_R_LEG, BP_L_ARM, BP_R_ARM)) var/obj/item/organ/external/o = get_organ(organ) - if(o && o.status & ORGAN_SPLINTED) - msg += "[T.He] [T.has] a splint on [T.his] [o.name]!\n" + if(o && o.splinted && o.splinted.loc == o) + msg += "[T.He] [T.has] \a [o.splinted] on [T.his] [o.name]!\n" if(suiciding) msg += "[T.He] appears to have commited suicide... there is no hope of recovery.\n" diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index d7c7de37ee..f459052a43 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1013,7 +1013,7 @@ /mob/living/carbon/human/proc/handle_embedded_objects() for(var/obj/item/organ/external/organ in src.organs) - if(organ.status & ORGAN_SPLINTED) //Splints prevent movement. + if(organ.splinted) //Splints prevent movement. continue for(var/obj/item/O in organ.implants) if(!istype(O,/obj/item/weapon/implant) && prob(5)) //Moving with things stuck in you could be bad. diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index ae9dd9a506..de4b36dceb 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -45,7 +45,7 @@ var/obj/item/organ/external/E = get_organ(organ_name) if(!E || E.is_stump()) tally += 4 - if(E.status & ORGAN_SPLINTED) + if(E.splinted) tally += 0.5 else if(E.status & ORGAN_BROKEN) tally += 1.5 @@ -57,7 +57,7 @@ var/obj/item/organ/external/E = get_organ(organ_name) if(!E || E.is_stump()) tally += 4 - else if(E.status & ORGAN_SPLINTED) + else if(E.splinted) tally += 0.5 else if(E.status & ORGAN_BROKEN) tally += 1.5 diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 8db85ef5fe..873a9e1220 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -142,10 +142,10 @@ return for (var/obj/item/organ/external/E in organs) - if(!E || !E.can_grasp || (E.status & ORGAN_SPLINTED)) + if(!E || !E.can_grasp) continue - if(E.is_broken() || E.is_dislocated()) + if((E.is_broken() || E.is_dislocated()) && !E.splinted) switch(E.body_part) if(HAND_LEFT, ARM_LEFT) if(!l_hand) diff --git a/code/modules/mob/living/carbon/human/stripping.dm b/code/modules/mob/living/carbon/human/stripping.dm index 0108886100..d67eaf76a9 100644 --- a/code/modules/mob/living/carbon/human/stripping.dm +++ b/code/modules/mob/living/carbon/human/stripping.dm @@ -125,11 +125,11 @@ if(can_reach_splints) var/removed_splint for(var/obj/item/organ/external/o in organs) - if (o && o.status & ORGAN_SPLINTED) + if (o && o.splinted) var/obj/item/S = o.splinted if(istype(S) && S.loc == o) //can only remove splints that are actually worn on the organ (deals with hardsuit splints) S.add_fingerprint(user) - if(o.remove_splints()) + if(o.remove_splint()) user.put_in_active_hand(S) removed_splint = 1 if(removed_splint) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 9d7ba1bc63..04058f2fe2 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -519,7 +519,7 @@ 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.status & ORGAN_SPLINTED)) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100)) + if(((e.status & ORGAN_BROKEN && !(e.splinted)) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100)) return 1 break return 0 diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index fad60cc0d7..c3a349df17 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -254,7 +254,6 @@ var/list/organ_cache = list() robotic = ORGAN_ROBOT src.status &= ~ORGAN_BROKEN src.status &= ~ORGAN_BLEEDING - src.status &= ~ORGAN_SPLINTED src.status &= ~ORGAN_CUT_AWAY /obj/item/organ/proc/mechassist() //Used to add things like pacemakers, etc diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 97fb4bf429..95ba3d9608 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -529,11 +529,11 @@ 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) && !(status & ORGAN_SPLINTED))) + return ((status & ORGAN_CUT_AWAY) || ((status & ORGAN_BROKEN) && !(splinted))) //Determines if we even need to process this organ. /obj/item/organ/external/proc/need_process() - if(status & (ORGAN_CUT_AWAY|ORGAN_BLEEDING|ORGAN_BROKEN|ORGAN_DESTROYED|ORGAN_SPLINTED|ORGAN_DEAD|ORGAN_MUTATED)) + if(status & (ORGAN_CUT_AWAY|ORGAN_BLEEDING|ORGAN_BROKEN|ORGAN_DESTROYED|ORGAN_DEAD|ORGAN_MUTATED)) return 1 if((brute_dam || burn_dam) && (robotic < ORGAN_ROBOT)) //Robot limbs don't autoheal and thus don't need to process when damaged return 1 @@ -1011,25 +1011,11 @@ Note that amputating the affected organ does in fact remove the infection from t // This is mostly for the ninja suit to stop ninja being so crippled by breaks. // TODO: consider moving this to a suit proc or process() or something during // hardsuit rewrite. - if(!(status & ORGAN_SPLINTED) && owner && istype(owner.wear_suit, /obj/item/clothing/suit/space)) + + if(!(splinted) && owner && istype(owner.wear_suit, /obj/item/clothing/suit/space)) var/obj/item/clothing/suit/space/suit = owner.wear_suit suit.check_limb_support() -/obj/item/organ/external/proc/apply_splint(var/atom/movable/splint) - if(!splinted) - splinted = splint - status |= ORGAN_SPLINTED - return 1 - return 0 - -/obj/item/organ/external/proc/remove_splint() - if(splinted) - if(splinted.loc == src) - splinted.dropInto(owner? owner.loc : src.loc) - splinted = null - status &= ~(ORGAN_SPLINTED) - return 1 - return 0 /obj/item/organ/external/proc/mend_fracture() if(robotic >= ORGAN_ROBOT) @@ -1040,6 +1026,20 @@ Note that amputating the affected organ does in fact remove the infection from t status &= ~ORGAN_BROKEN return 1 +/obj/item/organ/external/proc/apply_splint(var/atom/movable/splint) + if(!splinted) + splinted = splint + return 1 + return 0 + +/obj/item/organ/external/proc/remove_splint() + if(splinted) + if(splinted.loc == src) + splinted.dropInto(owner? owner.loc : src.loc) + splinted = null + return 1 + return 0 + /obj/item/organ/external/robotize(var/company, var/skip_prosthetics = 0, var/keep_organs = 0) if(robotic >= ORGAN_ROBOT) @@ -1063,6 +1063,7 @@ Note that amputating the affected organ does in fact remove the infection from t dislocated = -1 cannot_break = 1 + remove_splint() get_icon() unmutate() diff --git a/code/modules/surgery/bones.dm b/code/modules/surgery/bones.dm index cc4428fcb6..818e208ff4 100644 --- a/code/modules/surgery/bones.dm +++ b/code/modules/surgery/bones.dm @@ -140,7 +140,6 @@ user.visible_message("\blue [user] has mended the damaged bones in [target]'s [affected.name] with \the [tool]." , \ "\blue You have mended the damaged bones in [target]'s [affected.name] with \the [tool]." ) affected.status &= ~ORGAN_BROKEN - affected.status &= ~ORGAN_SPLINTED affected.stage = 0 fail_step(mob/living/user, mob/living/carbon/human/target, target_zone, obj/item/tool)