Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MIRROR] Allows Felinids to shower #5249

Merged
merged 4 commits into from
Dec 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading