diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 65a05fdcea0..1faf2f7e7ab 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -440,19 +440,19 @@ emp_act
var/penetrated_dam = max(0,(damage - SS.breach_threshold))
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
-/mob/living/human/reagent_permeability()
+/mob/living/carbon/human/reagent_permeability()
var/perm = 0
-
+
var/list/perm_by_part = list(
- "head" = THERMAL_PROTECTION_HEAD,
- "upper_torso" = THERMAL_PROTECTION_UPPER_TORSO,
- "lower_torso" = THERMAL_PROTECTION_LOWER_TORSO,
- "legs" = THERMAL_PROTECTION_LEG_LEFT + THERMAL_PROTECTION_LEG_RIGHT,
- "feet" = THERMAL_PROTECTION_FOOT_LEFT + THERMAL_PROTECTION_FOOT_RIGHT,
- "arms" = THERMAL_PROTECTION_ARM_LEFT + THERMAL_PROTECTION_ARM_RIGHT,
+ "head" = THERMAL_PROTECTION_HEAD,
+ "upper_torso" = THERMAL_PROTECTION_UPPER_TORSO,
+ "lower_torso" = THERMAL_PROTECTION_LOWER_TORSO,
+ "legs" = THERMAL_PROTECTION_LEG_LEFT + THERMAL_PROTECTION_LEG_RIGHT,
+ "feet" = THERMAL_PROTECTION_FOOT_LEFT + THERMAL_PROTECTION_FOOT_RIGHT,
+ "arms" = THERMAL_PROTECTION_ARM_LEFT + THERMAL_PROTECTION_ARM_RIGHT,
"hands" = THERMAL_PROTECTION_HAND_LEFT + THERMAL_PROTECTION_HAND_RIGHT
)
-
+
for(var/obj/item/clothing/C in src.get_equipped_items())
if(C.permeability_coefficient == 1 || !C.body_parts_covered)
continue
@@ -470,9 +470,9 @@ emp_act
perm_by_part["arms"] *= C.permeability_coefficient
if(C.body_parts_covered & HANDS)
perm_by_part["hands"] *= C.permeability_coefficient
-
+
for(var/part in perm_by_part)
perm += perm_by_part[part]
-
+
return perm
diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm
index a4ab3322217..4b6a03a7e24 100644
--- a/code/modules/organs/organ_external.dm
+++ b/code/modules/organs/organ_external.dm
@@ -838,13 +838,13 @@ Note that amputating the affected organ does in fact remove the infection from t
if((status & ORGAN_BROKEN) || cannot_break)
return
- owner.visible_message(\
- "\red You hear a loud cracking sound coming from \the [owner].",\
- "\red Something feels like it shattered in your [name]!",\
- "You hear a sickening crack.")
-
- if(owner.species && !(owner.species.flags & NO_PAIN))
- owner.emote("scream")
+ if(owner)
+ owner.visible_message(\
+ "\red You hear a loud cracking sound coming from \the [owner].",\
+ "\red Something feels like it shattered in your [name]!",\
+ "You hear a sickening crack.")
+ if(owner.species && !(owner.species.flags & NO_PAIN))
+ owner.emote("scream")
status |= ORGAN_BROKEN
broken_description = pick("broken","fracture","hairline fracture")
@@ -857,7 +857,7 @@ 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) && istype(owner,/mob/living/carbon/human))
+ if(owner && !(status & ORGAN_SPLINTED) && istype(owner,/mob/living/carbon/human))
var/mob/living/carbon/human/H = owner
@@ -905,11 +905,11 @@ Note that amputating the affected organ does in fact remove the infection from t
if(src.status & ORGAN_ROBOT)
return
src.status |= ORGAN_MUTATED
- owner.update_body()
+ if(owner) owner.update_body()
/obj/item/organ/external/proc/unmutate()
src.status &= ~ORGAN_MUTATED
- owner.update_body()
+ if(owner) owner.update_body()
/obj/item/organ/external/proc/get_damage() //returns total damage
return max(brute_dam + burn_dam - perma_injury, perma_injury) //could use max_damage?
@@ -929,7 +929,7 @@ Note that amputating the affected organ does in fact remove the infection from t
return ((status & ORGAN_ROBOT) && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam))
/obj/item/organ/external/proc/embed(var/obj/item/weapon/W, var/silent = 0)
- if(loc != owner)
+ if(!owner || loc != owner)
return
if(!silent)
owner.visible_message("\The [W] sticks in the wound!")
@@ -1013,7 +1013,7 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/get_wounds_desc()
. = ""
if(status & ORGAN_DESTROYED && !is_stump())
- . += "tear at [amputation_point] so bad it barely hangs on few tendons"
+ . += "tear at [amputation_point] so severe that it hangs by a scrap of flesh"
if(status & ORGAN_ROBOT)
if(brute_dam)