diff --git a/code/datums/status_effects/neutral.dm b/code/datums/status_effects/neutral.dm index f8814c56f14..90f9a3c3097 100644 --- a/code/datums/status_effects/neutral.dm +++ b/code/datums/status_effects/neutral.dm @@ -610,11 +610,56 @@ SIGNAL_HANDLER qdel(src) -/atom/movable/screen/alert/status_effect/shower_regen +/datum/status_effect/washing_regen + id = "shower_regen" + duration = STATUS_EFFECT_PERMANENT + status_type = STATUS_EFFECT_UNIQUE + alert_type = /atom/movable/screen/alert/status_effect/washing_regen + ///The screen alert shown if you hate water + var/hater_alert = /atom/movable/screen/alert/status_effect/washing_regen/hater + /// How much stamina we regain from washing + var/stamina_heal_per_tick = -4 + /// How much brute, tox and fie damage we heal from this + var/heal_per_tick = 0 + +/datum/status_effect/washing_regen/on_apply() + . = ..() + if(HAS_TRAIT(owner, TRAIT_WATER_HATER) && !HAS_TRAIT(owner, TRAIT_WATER_ADAPTATION)) + alert_type = hater_alert + +/datum/status_effect/washing_regen/tick(seconds_between_ticks) + . = ..() + var/water_adaptation = HAS_TRAIT(owner, TRAIT_WATER_ADAPTATION) + var/water_hater = HAS_TRAIT(owner, TRAIT_WATER_HATER) + var/stam_recovery = (water_hater && !water_adaptation ? -stamina_heal_per_tick : stamina_heal_per_tick) * seconds_between_ticks + var/recovery = heal_per_tick + if(water_adaptation) + recovery -= 1 + stam_recovery *= 1.5 + else if(water_hater) + recovery *= 0 + stam_recovery = 0 // NOVA EDIT ADDITIION - null the stamina damage. + recovery *= seconds_between_ticks + + var/healed = 0 + if(recovery) //very mild healing for those with the water adaptation trait (fish infusion) + healed += owner.adjustOxyLoss(recovery * (water_adaptation ? 1.5 : 1), updating_health = FALSE, required_biotype = MOB_ORGANIC) + healed += owner.adjustFireLoss(recovery, updating_health = FALSE, required_bodytype = BODYTYPE_ORGANIC) + healed += owner.adjustToxLoss(recovery, updating_health = FALSE, required_biotype = MOB_ORGANIC) + healed += owner.adjustBruteLoss(recovery, updating_health = FALSE, required_bodytype = BODYTYPE_ORGANIC) + healed += owner.adjustStaminaLoss(stam_recovery, updating_stamina = FALSE) + if(healed) + owner.updatehealth() + +/atom/movable/screen/alert/status_effect/washing_regen name = "Washing" desc = "A good wash fills me with energy!" icon_state = "shower_regen" +/atom/movable/screen/alert/status_effect/washing_regen/hater + desc = "Waaater... Fuck this WATER!!" + icon_state = "shower_regen_catgirl" + /atom/movable/screen/alert/status_effect/shower_regen/hater name = "Washing" desc = "Waaater... Fuck this WATER!!"