From 8e0b2f11dc0760aa72d74fd36ff0f1018180760c Mon Sep 17 00:00:00 2001 From: Mechoid Date: Thu, 23 Jan 2020 13:39:45 -0800 Subject: [PATCH] FixWaterA G A I N --- code/modules/mob/living/carbon/human/human_defense.dm | 7 +++++++ code/modules/mob/living/carbon/human/species/species.dm | 9 ++++++++- .../living/carbon/human/species/station/prometheans.dm | 1 + 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index a474490fbc..52d771ad30 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -586,6 +586,13 @@ emp_act converted_protection *= perm return CLAMP(1-converted_protection, 0, 1) +/mob/living/carbon/human/water_act(amount) + adjust_fire_stacks(-amount * 5) + for(var/atom/movable/AM in contents) + AM.water_act(amount) + remove_modifiers_of_type(/datum/modifier/fire) + + species.handle_water_damage(src, amount) /mob/living/carbon/human/shank_attack(obj/item/W, obj/item/weapon/grab/G, mob/user, hit_zone) diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 3b123bbe01..fbac7288fd 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -142,7 +142,8 @@ "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/water_resistance = 0.1 // How wet the species gets from being splashed. + var/water_damage_mod = 0 // How much water damage is multiplied by when splashing this species. var/passive_temp_gain = 0 // Species will gain this much temperature every second var/hazard_high_pressure = HAZARD_HIGH_PRESSURE // Dangerously high pressure. @@ -461,3 +462,9 @@ // Allow species to display interesting information in the human stat panels /datum/species/proc/Stat(var/mob/living/carbon/human/H) return + +/datum/species/proc/handle_water_damage(var/mob/living/carbon/human/H, var/amount = 0) + amount *= 1 - H.get_water_protection() + amount *= water_damage_mod + if(amount > 0) + H.adjustToxLoss(amount) 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 bd4be0823f..0e5fab2280 100644 --- a/code/modules/mob/living/carbon/human/species/station/prometheans.dm +++ b/code/modules/mob/living/carbon/human/species/station/prometheans.dm @@ -72,6 +72,7 @@ var/datum/species/shapeshifter/promethean/prometheans siemens_coefficient = 0.8 water_resistance = 0 + water_damage_mod = 0.3 genders = list(MALE, FEMALE, NEUTER, PLURAL)