diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 9bd9e779c3c..634fd0e129d 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -1,11 +1,11 @@
/obj/item/clothing
name = "clothing"
var/list/species_restricted = null //Only these species can wear this kit.
-
+
/*
- Sprites used when the clothing item is refit. This is done by setting icon_override.
+ Sprites used when the clothing item is refit. This is done by setting icon_override.
For best results, if this is set then sprite_sheets should be null and vice versa, but that is by no means necessary.
- Ideally, sprite_sheets_refit should be used for "hard" clothing items that can't change shape very well to fit the wearer (e.g. helmets, hardsuits),
+ Ideally, sprite_sheets_refit should be used for "hard" clothing items that can't change shape very well to fit the wearer (e.g. helmets, hardsuits),
while sprite_sheets should be used for "flexible" clothing items that do not need to be refitted (e.g. vox wearing jumpsuits).
*/
var/list/sprite_sheets_refit = null
@@ -53,7 +53,7 @@
icon_override = sprite_sheets_refit[target_species]
else
icon_override = initial(icon_override)
-
+
if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
icon = sprite_sheets_obj[target_species]
else
@@ -74,7 +74,7 @@
icon_override = sprite_sheets_refit[target_species]
else
icon_override = initial(icon_override)
-
+
if (sprite_sheets_obj && (target_species in sprite_sheets_obj))
icon = sprite_sheets_obj[target_species]
else
@@ -205,10 +205,10 @@ BLIND // can't see anything
user << "The [src] have already been clipped!"
update_icon()
return
-
+
playsound(src.loc, 'sound/items/Wirecutter.ogg', 100, 1)
user.visible_message("\red [user] cuts the fingertips off of the [src].","\red You cut the fingertips off of the [src].")
-
+
clipped = 1
name = "mangled [name]"
desc = "[desc]
They have had the fingertips cut off of them."
@@ -302,6 +302,37 @@ BLIND // can't see anything
siemens_coefficient = 0.9
species_restricted = list("exclude","Diona","Vox")
+ var/list/supporting_limbs //If not-null, automatically splints breaks. Checked when removing the suit.
+
+/obj/item/clothing/suit/space/equipped(mob/M)
+ check_limb_support()
+ ..()
+
+/obj/item/clothing/suit/space/dropped()
+ check_limb_support()
+ ..()
+
+// Some space suits are equipped with reactive membranes that support
+// broken limbs - at the time of writing, only the ninja suit, but
+// I can see it being useful for other suits as we expand them. ~ Z
+// The actual splinting occurs in /datum/organ/external/proc/fracture()
+/obj/item/clothing/suit/space/proc/check_limb_support()
+
+ // If this isn't set, then we don't need to care.
+ if(!supporting_limbs || !supporting_limbs.len)
+ return
+
+ var/mob/living/carbon/human/H = src.loc
+
+ // If the holder isn't human, or the holder IS and is wearing the suit, it keeps supporting the limbs.
+ if(!istype(H) || H.wear_suit == src)
+ return
+
+ // Otherwise, remove the splints.
+ for(var/datum/organ/external/E in supporting_limbs)
+ E.status &= ~ ORGAN_SPLINTED
+ supporting_limbs = list()
+
//Under clothing
/obj/item/clothing/under
icon = 'icons/obj/clothing/uniforms.dmi'
diff --git a/code/modules/clothing/spacesuits/ninja.dm b/code/modules/clothing/spacesuits/ninja.dm
index f10e55168f0..6a70bbfc609 100644
--- a/code/modules/clothing/spacesuits/ninja.dm
+++ b/code/modules/clothing/spacesuits/ninja.dm
@@ -20,12 +20,17 @@
siemens_coefficient = 0.2
species_restricted = null //Workaround for spawning alien ninja without internals.
body_parts_covered = UPPER_TORSO|LOWER_TORSO|LEGS|ARMS
+ supporting_limbs = list()
- //Important parts of the suit.
+ // Hardsuit breaching data
+ breach_threshold = 30 //A suit breach is a major issue for ninjas. This should maybe help.
+ can_breach = 1
+
+ //Important parts of the suit.
var/mob/living/carbon/affecting = null//The wearer.
var/obj/item/weapon/cell/cell//Starts out with a high-capacity cell using New().
var/datum/effect/effect/system/spark_spread/spark_system//To create sparks.
- var/reagent_list[] = list("tricordrazine","dexalinp","spaceacillin","anti_toxin","nutriment","radium","hyronalin")//The reagents ids which are added to the suit at New().
+ var/reagent_list[] = list("tricordrazine","tramadol","dexalinp","spaceacillin","anti_toxin","nutriment","radium","hyronalin")//The reagents ids which are added to the suit at New().
var/stored_research[]//For stealing station research.
var/obj/item/weapon/disk/tech_disk/t_disk//To copy design onto disk.
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index 036e13e3c47..bba9246ea7c 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -321,7 +321,6 @@ This function completely restores a damaged organ to perfect condition.
//Infections
update_germs()
- return
//Updating germ levels. Handles organ germ levels and necrosis.
/*
@@ -725,8 +724,10 @@ Note that amputating the affected organ does in fact remove the infection from t
return rval
/datum/organ/external/proc/fracture()
+
if(status & ORGAN_BROKEN)
return
+
owner.visible_message(\
"\red You hear a loud cracking sound coming from \the [owner].",\
"\red Something feels like it shattered in your [display_name]!",\
@@ -743,6 +744,25 @@ Note that amputating the affected organ does in fact remove the infection from t
if (prob(25))
release_restraints()
+ // 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) && istype(owner,/mob/living/carbon/human))
+
+ var/mob/living/carbon/human/H = owner
+
+ if(H.wear_suit && istype(H.wear_suit,/obj/item/clothing/suit/space))
+
+ var/obj/item/clothing/suit/space/suit = H.wear_suit
+
+ if(isnull(suit.supporting_limbs))
+ return
+
+ owner << "You feel \the [suit] constrict about your [display_name], supporting it."
+ status |= ORGAN_SPLINTED
+ suit.supporting_limbs |= src
+ return
+
/datum/organ/external/proc/robotize()
src.status &= ~ORGAN_BROKEN
src.status &= ~ORGAN_BLEEDING