Files
GhomandGitHub 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

61 lines
2.3 KiB
Plaintext

/datum/status_effect/tower_of_babel
id = "tower_of_babel"
status_type = STATUS_EFFECT_UNIQUE
alert_type = /atom/movable/screen/alert/status_effect/tower_of_babel
var/trait_source
/datum/status_effect/tower_of_babel/on_creation(mob/living/new_owner, duration = 15 SECONDS)
src.duration = duration
if(isnull(trait_source))
trait_source = TRAIT_STATUS_EFFECT(id)
return ..()
/datum/status_effect/tower_of_babel/on_apply()
var/random_language = pick(GLOB.all_languages)
owner.grant_language(random_language, source = LANGUAGE_BABEL)
// block every language except the randomized one
owner.add_blocked_language(GLOB.all_languages - random_language, source = LANGUAGE_BABEL)
// this lets us bypass tongue language restrictions except for people who have stuff like mute,
// no tongue, tongue tied, etc. curse of babel shouldn't let people who have a tongue disability speak
if(owner.mind)
ADD_TRAIT(owner.mind, TRAIT_TOWER_OF_BABEL, trait_source)
owner.add_mood_event(id, /datum/mood_event/tower_of_babel)
return ..()
/datum/status_effect/tower_of_babel/on_remove()
owner.clear_mood_event(id)
// if user is affected by tower of babel, we remove the blocked languages
owner.remove_blocked_language(GLOB.all_languages, source = LANGUAGE_BABEL)
owner.remove_all_languages(source = LANGUAGE_BABEL)
if(owner.mind)
REMOVE_TRAIT(owner.mind, TRAIT_TOWER_OF_BABEL, trait_source)
return ..()
// Used by wizard magic and tower of babel event
/datum/status_effect/tower_of_babel/magical
id = "tower_of_babel_magic" // do we need a new id?
duration = STATUS_EFFECT_PERMANENT
trait_source = TRAUMA_TRAIT
/datum/status_effect/tower_of_babel/magical/on_apply()
. = ..()
if(!.)
return
owner.emote("mumble")
owner.playsound_local(get_turf(owner), 'sound/effects/magic/magic_block_mind.ogg', 75, vary = TRUE) // sound of creepy whispers
to_chat(owner, span_reallybig(span_hypnophrase("You feel a magical force affecting your speech patterns!")))
/datum/status_effect/tower_of_babel/magical/on_remove()
. = ..()
if(!.)
return
to_chat(owner, span_reallybig(span_hypnophrase("You feel the magical force affecting your speech patterns fade away...")))
/atom/movable/screen/alert/status_effect/tower_of_babel
name = "Tower of babel"
desc = "You seem to be babbling in a strange language..."
use_user_hud_icon = TRUE
overlay_state = "mind_control"