From 5954adfe46d07a6d90c898d7b61784d90b5c3dbc Mon Sep 17 00:00:00 2001 From: Atermonera Date: Mon, 20 Jan 2020 19:51:35 -0800 Subject: [PATCH] Merge pull request #6622 from Mechoid/WaterResistanceExists Water resistance exists --- code/modules/mob/living/carbon/human/human_defense.dm | 7 +++---- code/modules/mob/living/carbon/human/species/species.dm | 1 + .../mob/living/carbon/human/species/station/prometheans.dm | 6 ++++-- .../reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm | 2 +- 4 files changed, 9 insertions(+), 7 deletions(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 57cef190ecf..a474490fbc9 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -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 \ No newline at end of file + return 1 diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index dfc44661c85..37a8cc2b6df 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -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. diff --git a/code/modules/mob/living/carbon/human/species/station/prometheans.dm b/code/modules/mob/living/carbon/human/species/station/prometheans.dm index 55d11cd701e..68a4ab13753 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -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. diff --git a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm index cbe7dd9c5b0..ed68723d154 100644 --- a/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm +++ b/code/modules/reagents/Chemistry-Reagents/Chemistry-Reagents-Core.dm @@ -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("[M]'s flesh sizzles where the water touches it!", "Your flesh burns in the water!") ..() */ //VOREStation Edit End.