Skip to content

Commit

Permalink
[MIRROR] Allows Felinids to shower (#5249)
Browse files Browse the repository at this point in the history
* Allows Felinids to shower (#4686)

sets to 0 stamina damage of water haters when in water instead of being damaged (compared to being recovered for regular people)

* [MIRROR] Allows Felinids to shower

* Fix conflict

* Fix conflict 2

---------

Co-authored-by: OrbisAnima <[email protected]>
Co-authored-by: StealsThePRs <[email protected]>
Co-authored-by: Feenie <[email protected]>
  • Loading branch information
4 people authored Dec 18, 2024
1 parent 1df5d39 commit 53c98d2
Showing 1 changed file with 46 additions and 1 deletion.
47 changes: 46 additions & 1 deletion code/datums/status_effects/neutral.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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!!"
Expand Down

0 comments on commit 53c98d2

Please sign in to comment.