Files
Ghom 999bde8f84 Most screen alerts now fit the player's hud style. (#93493)
## About The Pull Request
Most screen alerts that use the midnight hud style no longer have the
button baked in their icon. Other screen alerts with their own
background or shape (robot and mech alerts, atmos, heretic buffs or
debuffs etc.) are not affected. Also updated a couple sprites but didn't
spend too much time on them. Mostly reusing existing assets.

Montage of how the alerts look on threee different hud styles
(Operative, Trasen-Knox, Detective, ALSO I FIXED THE BUCKLED ALERT
ALREADY):
<img width="293" height="323" alt="image"
src="https://github.com/user-attachments/assets/3a2b972b-aa5a-4c27-a454-c8c39acf6e20"
/>
It looks only a smidge iffy on the syndicate since the top and bottom
borders aren't layered over all the overlays, but it isn't something to
worry about in this PR.

## Why It's Good For The Game
Screen alerts always had the midnight hud button baked in their icon
states (now overlays), which completely disregard the player's hud
setting, much unlike action alerts buttons. Melbert has also said that
it'd be nice if the code for action buttons could also be used in screen
alerts and viceversa, to slim things down. That's obviously not what I'm
doing today, but having most of the screen alerts already without the
baked background will surely help if we ever pursue that objective.

## Changelog

🆑
refactor: Refactored screen alerts a little. Most should now fit the
player's hud style. Report any issue.
imageadd: A few screen alerts have been polished/updated a little.
/🆑
2025-10-31 15:30:39 -06:00

88 lines
3.1 KiB
Plaintext

/// The amount of mutadone we can process for strike recovery at once.
#define MUTADONE_HEAL 1
/datum/status_effect/decloning
id = "decloning"
tick_interval = 3 SECONDS
alert_type = /atom/movable/screen/alert/status_effect/decloning
remove_on_fullheal = TRUE
/// How many strikes our status effect holder has left before they are dusted.
var/strikes_left = 100
/datum/status_effect/decloning/on_apply()
if(owner.has_reagent(/datum/reagent/medicine/mutadone))
return FALSE
to_chat(owner, span_userdanger("You've noticed your body has begun deforming. This can't be good."))
return TRUE
/datum/status_effect/decloning/on_remove()
if(!QDELETED(owner)) // bigger problems to worry about
owner.remove_movespeed_modifier(/datum/movespeed_modifier/decloning)
/datum/status_effect/decloning/tick(seconds_between_ticks)
if(owner.has_reagent(/datum/reagent/medicine/mutadone, MUTADONE_HEAL * seconds_between_ticks))
var/strike_restore = MUTADONE_HEAL * seconds_between_ticks
if(strikes_left <= 50 && strikes_left + strike_restore > 50)
to_chat(owner, span_notice("Controlling your muscles feels easier now."))
owner.remove_movespeed_modifier(/datum/movespeed_modifier/decloning)
else if(SPT_PROB(5, seconds_between_ticks))
to_chat(owner, span_warning("Your body is growing and shifting back into place."))
strikes_left = min(strikes_left + strike_restore, 100)
owner.reagents.remove_reagent(/datum/reagent/medicine/mutadone, MUTADONE_HEAL * seconds_between_ticks)
if(strikes_left == 100)
qdel(src)
return
if(!SPT_PROB(5, seconds_between_ticks))
return
var/strike_reduce = 3
if(strikes_left > 50 && strikes_left - strike_reduce <= 50)
to_chat(owner, span_danger("You're having a hard time controlling your muscles."))
owner.add_movespeed_modifier(/datum/movespeed_modifier/decloning)
strikes_left = max(strikes_left - strike_reduce, 0)
if(prob(50))
to_chat(owner, span_danger(pick(
"Your body is giving in.",
"You feel some muscles twitching.",
"Your skin feels sandy.",
"You feel your limbs shifting around.",
)))
else if(prob(33))
to_chat(owner, span_danger("You are twitching uncontrollably."))
owner.set_jitter_if_lower(30 SECONDS)
if(strikes_left == 0)
owner.visible_message(span_danger("[owner]'s skin turns to dust!"), span_boldwarning("Your skin turns to dust!"))
owner.dust()
return
/datum/status_effect/decloning/get_examine_text()
switch(strikes_left)
if(68 to 100)
return span_warning("[owner.p_Their()] body looks a bit deformed.")
if(34 to 67)
return span_warning("[owner.p_Their()] body looks <b>very</b> deformed.")
if(-INFINITY to 33)
return span_boldwarning("[owner.p_Their()] body looks severely deformed!")
/atom/movable/screen/alert/status_effect/decloning
name = "Cellular Meltdown"
desc = "Your body is deforming, and doesn't feel like it's going to hold up much longer. You are going to need treatment soon."
use_user_hud_icon = TRUE
overlay_state = "dna_melt"
/datum/movespeed_modifier/decloning
multiplicative_slowdown = 0.7
blacklisted_movetypes = (FLYING|FLOATING)
#undef MUTADONE_HEAL