Merge pull request #6622 from Mechoid/WaterResistanceExists

Water resistance exists
This commit is contained in:
Atermonera
2020-01-20 19:51:35 -08:00
committed by VirgoBot
parent c877f3d265
commit 5954adfe46
4 changed files with 9 additions and 7 deletions

View File

@@ -575,9 +575,8 @@ emp_act
return perm
// 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 +584,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)
@@ -614,4 +613,4 @@ emp_act
G.last_action = world.time
flick(G.hud.icon_state, G.hud)
return 1
return 1

View File

@@ -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.

View File

@@ -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)
@@ -171,8 +173,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.

View File

@@ -194,7 +194,7 @@
..()
/datum/reagent/water/affect_touch(var/mob/living/carbon/M, var/alien, var/removed)
if(alien == IS_SLIME)
if(alien == IS_SLIME && prob(10))
M.visible_message("<span class='warning'>[M]'s flesh sizzles where the water touches it!</span>", "<span class='danger'>Your flesh burns in the water!</span>")
..()
*/ //VOREStation Edit End.