Preliminary

This commit is contained in:
Mechoid
2020-01-12 15:29:53 -08:00
parent 335676d340
commit 9699844fc7
4 changed files with 8 additions and 5 deletions
@@ -577,7 +577,7 @@ emp_act
// This is for preventing harm by being covered in water, which only prometheans need to deal with.
// This is not actually used for now since the code for prometheans gets changed a lot.
/mob/living/carbon/human/get_water_protection()
var/protection = ..() // Todo: Replace with species var later.
var/protection = species.water_resistance
if(protection == 1) // No point doing permeability checks if it won't matter.
return protection
// Wearing clothing with a low permeability_coefficient can protect from water.
@@ -585,7 +585,7 @@ emp_act
var/converted_protection = 1 - protection
var/perm = reagent_permeability()
converted_protection *= perm
return 1-converted_protection
return CLAMP(1-converted_protection, 0, 1)
/mob/living/carbon/human/shank_attack(obj/item/W, obj/item/weapon/grab/G, mob/user, hit_zone)
@@ -142,6 +142,7 @@
"Your skin prickles in the heat."
)
var/water_resistance = 0.1 // How wet the species gets from being splashed. Only really useful for Prometheans.
var/passive_temp_gain = 0 // Species will gain this much temperature every second
var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure.
@@ -71,6 +71,8 @@ var/datum/species/shapeshifter/promethean/prometheans
rarity_value = 5
siemens_coefficient = 0.8
water_resistance = 0
genders = list(MALE, FEMALE, NEUTER, PLURAL)
unarmed_types = list(/datum/unarmed_attack/slime_glomp)
@@ -166,8 +168,8 @@ var/datum/species/shapeshifter/promethean/prometheans
var/regen_burn = TRUE
var/regen_tox = TRUE
var/regen_oxy = TRUE
if(H.fire_stacks < 0) // If you're soaked, you're melting.
H.adjustToxLoss(3 * heal_rate) // Tripled because 0.5 is miniscule, and fire_stacks are capped in both directions
if(H.fire_stacks < 0 && H.get_water_protection() <= 0.5) // If over half your body is soaked, you're melting.
H.adjustToxLoss(max(0,(3 - (3 * H.get_water_protection())) * heal_rate)) // Tripled because 0.5 is miniscule, and fire_stacks are capped in both directions.
healing = FALSE
//Prometheans automatically clean every surface they're in contact with every life tick - this includes the floor without shoes.