mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-29 16:18:01 +01:00
Station announcements cleanup (#79315)
## About The Pull Request - As the size of the announcement proc has grown over the past few PRs, did a pass over them for readability and consistency - Include the arg names for coders unfamiliar with the new announcement format - Replaced leftover hardcoded Central Command text with the command name proc, so all announcements reflect the command name if changed by an admin - Replaced hard coded emergency shuttle timer text with the actual timeleft vars, so it's correct if the timers are changed for any reason - Darkens the dark mode blue/red headers to be more red less pink, while staying in accessibility standards - Adds a lower profile grey colour for automated non-Central Command announcements ## Changelog 🆑 LT3 code: Emergency shuttle announcements no longer use hardcoded values code: Central Command announcements now correctly use its new name when changed spellcheck: Consistency pass on event announcements /🆑
This commit is contained in:
@@ -24,7 +24,12 @@ SUBSYSTEM_DEF(nightshift)
|
||||
check_nightshift()
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/announce(message)
|
||||
priority_announce(message, sound='sound/misc/notice2.ogg', sender_override="Automated Lighting System Announcement")
|
||||
priority_announce(
|
||||
text = message,
|
||||
sound = 'sound/misc/notice2.ogg',
|
||||
sender_override = "Automated Lighting System Announcement",
|
||||
color_override = "grey",
|
||||
)
|
||||
|
||||
/datum/controller/subsystem/nightshift/proc/check_nightshift()
|
||||
var/emergency = SSsecurity_level.get_current_level_as_number() >= SEC_LEVEL_RED
|
||||
|
||||
@@ -261,13 +261,27 @@ SUBSYSTEM_DEF(shuttle)
|
||||
message_admins(msg)
|
||||
log_shuttle("[msg] Alive: [alive], Roundstart: [total], Threshold: [threshold]")
|
||||
emergency_no_recall = TRUE
|
||||
priority_announce("Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.")
|
||||
priority_announce(
|
||||
text = "Catastrophic casualties detected: crisis shuttle protocols activated - jamming recall signals across all frequencies.",
|
||||
title = "Emergency Shuttle Dispatched",
|
||||
sound = ANNOUNCER_SHUTTLECALLED,
|
||||
sender_override = "Emergency Shuttle Uplink Alert",
|
||||
color_override = "orange",
|
||||
)
|
||||
if(emergency.timeLeft(1) > emergency_call_time * ALERT_COEFF_AUTOEVAC_CRITICAL)
|
||||
emergency.request(null, set_coefficient = ALERT_COEFF_AUTOEVAC_CRITICAL)
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/block_recall(lockout_timer)
|
||||
if(isnull(lockout_timer))
|
||||
CRASH("Emergency shuttle block was called, but missing a value for the lockout duration")
|
||||
if(admin_emergency_no_recall)
|
||||
priority_announce("Error!", "Emergency Shuttle Uplink Alert", 'sound/misc/announce_dig.ogg')
|
||||
priority_announce(
|
||||
text = "Emergency shuttle uplink interference detected, shuttle call disabled while the system reinitializes. Estimated restore in [DisplayTimeText(lockout_timer, round_seconds_to = 60)].",
|
||||
title = "Uplink Interference",
|
||||
sound = 'sound/misc/announce_dig.ogg',
|
||||
sender_override = "Emergency Shuttle Uplink Alert",
|
||||
color_override = "grey",
|
||||
)
|
||||
addtimer(CALLBACK(src, PROC_REF(unblock_recall)), lockout_timer)
|
||||
return
|
||||
emergency_no_recall = TRUE
|
||||
@@ -275,7 +289,13 @@ SUBSYSTEM_DEF(shuttle)
|
||||
|
||||
/datum/controller/subsystem/shuttle/proc/unblock_recall()
|
||||
if(admin_emergency_no_recall)
|
||||
priority_announce("Error!", "Emergency Shuttle Uplink Alert", 'sound/misc/announce_dig.ogg')
|
||||
priority_announce(
|
||||
text= "Emergency shuttle uplink services are now back online.",
|
||||
title = "Uplink Restored",
|
||||
sound = 'sound/misc/announce_dig.ogg',
|
||||
sender_override = "Emergency Shuttle Uplink Alert",
|
||||
color_override = "green",
|
||||
)
|
||||
return
|
||||
emergency_no_recall = FALSE
|
||||
|
||||
@@ -503,15 +523,23 @@ SUBSYSTEM_DEF(shuttle)
|
||||
emergency.mode = SHUTTLE_STRANDED
|
||||
emergency.timer = null
|
||||
emergency.sound_played = FALSE
|
||||
priority_announce("Hostile environment detected. \
|
||||
Departure has been postponed indefinitely pending \
|
||||
conflict resolution.", null, 'sound/misc/notice1.ogg', ANNOUNCEMENT_TYPE_PRIORITY)
|
||||
priority_announce(
|
||||
text = "Departure has been postponed indefinitely pending conflict resolution.",
|
||||
title = "Hostile Environment Detected",
|
||||
sound = 'sound/misc/notice1.ogg',
|
||||
sender_override = "Emergency Shuttle Uplink Alert",
|
||||
color_override = "grey",
|
||||
)
|
||||
if(!emergency_no_escape && (emergency.mode == SHUTTLE_STRANDED))
|
||||
emergency.mode = SHUTTLE_DOCKED
|
||||
emergency.setTimer(emergency_dock_time)
|
||||
priority_announce("Hostile environment resolved. \
|
||||
You have 3 minutes to board the Emergency Shuttle.",
|
||||
null, ANNOUNCER_SHUTTLEDOCK, ANNOUNCEMENT_TYPE_PRIORITY)
|
||||
priority_announce(
|
||||
text = "You have [DisplayTimeText(emergency_dock_time)] to board the emergency shuttle.",
|
||||
title = "Hostile Environment Resolved",
|
||||
sound = 'sound/misc/announce_dig.ogg',
|
||||
sender_override = "Emergency Shuttle Uplink Alert",
|
||||
color_override = "green",
|
||||
)
|
||||
|
||||
//try to move/request to dock_home if possible, otherwise dock_away. Mainly used for admin buttons
|
||||
/datum/controller/subsystem/shuttle/proc/toggleShuttle(shuttle_id, dock_home, dock_away, timed)
|
||||
|
||||
Reference in New Issue
Block a user