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

64 lines
2.5 KiB
Plaintext

///Status effect applied when casting a fishing rod at someone, provided the attached fishing hook allows it.
/datum/status_effect/grouped/hooked
id = "hooked"
duration = STATUS_EFFECT_PERMANENT
tick_interval = STATUS_EFFECT_NO_TICK
status_type = STATUS_EFFECT_MULTIPLE
alert_type = /atom/movable/screen/alert/status_effect/hooked
/datum/status_effect/grouped/hooked/proc/try_unhook()
return do_after(owner, 2 SECONDS, timed_action_flags = IGNORE_USER_LOC_CHANGE, extra_checks = CALLBACK(src, PROC_REF(still_exists)), interaction_key = DOAFTER_SOURCE_REMOVING_HOOK)
/datum/status_effect/grouped/hooked/proc/still_exists()
return !QDELETED(src)
/datum/status_effect/grouped/hooked/source_added(datum/beam/fishing_line/source)
RegisterSignal(source, COMSIG_QDELETING, PROC_REF(on_fishing_line_deleted))
/datum/status_effect/grouped/hooked/proc/on_fishing_line_deleted(datum/source)
SIGNAL_HANDLER
owner.remove_status_effect(type, source)
/atom/movable/screen/alert/status_effect/hooked
name = "Snagged By Hook"
desc = "You're being caught like a fish by some asshat! Click to safely remove the hook or move away far enough to snap it off."
use_user_hud_icon = TRUE
overlay_state = "hooked"
clickable_glow = TRUE
/atom/movable/screen/alert/status_effect/hooked/Click()
. = ..()
if(!.)
return
if(!owner.can_resist())
return
owner.balloon_alert(owner, "removing hook...")
var/datum/status_effect/grouped/hooked/effect = owner.has_status_effect(attached_effect.type)
if(!effect.try_unhook())
return
owner.balloon_alert(owner, "hook removed")
var/datum/beam/fishing_line/rand_source = pick(effect.sources)
qdel(rand_source)
///Version used by the jawed fishing hook, which also applies slowdown
/datum/status_effect/grouped/hooked/jaws
id = "hooked_jaws"
alert_type = /atom/movable/screen/alert/status_effect/hooked/jaws
/datum/status_effect/grouped/hooked/jaws/on_apply()
. = ..()
owner.add_movespeed_modifier(/datum/movespeed_modifier/hook_jawed)
/datum/status_effect/grouped/hooked/jaws/on_remove()
. = ..()
owner.remove_movespeed_modifier(/datum/movespeed_modifier/hook_jawed)
/datum/status_effect/grouped/hooked/jaws/try_unhook()
return do_after(owner, 10 SECONDS, extra_checks = CALLBACK(src, PROC_REF(still_exists)), interaction_key = DOAFTER_SOURCE_REMOVING_HOOK)
/atom/movable/screen/alert/status_effect/hooked/jaws
name = "Snagged By Jaws"
desc = "You've been snagged by some sort of beartrap-slash-fishing-hook-gizmo! Click to safely remove the hook or move away far enough to snap it off."
use_user_hud_icon = TRUE
overlay_state = "hooked_jaws"