Makes showers wash away touching reagents

Also moves reagent permeability to it's own proc, and makes splash_mob respect copy
This commit is contained in:
mwerezak
2015-06-13 16:06:54 -04:00
committed by HarpyEagle
parent 4cb70b2b94
commit 70433b4367
5 changed files with 71 additions and 39 deletions
@@ -444,4 +444,41 @@ emp_act
if(!istype(wear_suit,/obj/item/clothing/suit/space)) return
var/obj/item/clothing/suit/space/SS = wear_suit
var/penetrated_dam = max(0,(damage - SS.breach_threshold))
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
if(penetrated_dam) SS.create_breaches(damtype, penetrated_dam)
/mob/living/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,
"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
if(C.body_parts_covered & HEAD)
perm_by_part["head"] *= C.permeability_coefficient
if(C.body_parts_covered & UPPER_TORSO)
perm_by_part["upper_torso"] *= C.permeability_coefficient
if(C.body_parts_covered & LOWER_TORSO)
perm_by_part["lower_torso"] *= C.permeability_coefficient
if(C.body_parts_covered & LEGS)
perm_by_part["legs"] *= C.permeability_coefficient
if(C.body_parts_covered & FEET)
perm_by_part["feet"] *= C.permeability_coefficient
if(C.body_parts_covered & ARMS)
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
@@ -247,3 +247,6 @@
//Scale quadratically so that single digit numbers of fire stacks don't burn ridiculously hot.
//lower limit of 700 K, same as matches and roughly the temperature of a cool flame.
return max(2.25*round(FIRESUIT_MAX_HEAT_PROTECTION_TEMPERATURE*(fire_stacks/FIRE_MAX_FIRESUIT_STACKS)**2), 700)
/mob/living/proc/reagent_permeability()
return 1