diff --git a/code/__DEFINES/announcements.dm b/code/__DEFINES/announcements.dm
new file mode 100644
index 00000000000..3a2edf6d6f7
--- /dev/null
+++ b/code/__DEFINES/announcements.dm
@@ -0,0 +1,7 @@
+// Priority-type announcement messages for `priority_announcement()`
+/// Prefix this announcement with "Priority Announcement"
+#define ANNOUNCEMENT_TYPE_PRIORITY "Priority"
+/// Make it sound like it's coming from the Captain
+#define ANNOUNCEMENT_TYPE_CAPTAIN "Captain"
+/// Make it sound like it's coming from the Syndicate
+#define ANNOUNCEMENT_TYPE_SYNDICATE "Syndicate"
diff --git a/code/__HELPERS/priority_announce.dm b/code/__HELPERS/priority_announce.dm
index 672b67e7cc4..0152358d94d 100644
--- a/code/__HELPERS/priority_announce.dm
+++ b/code/__HELPERS/priority_announce.dm
@@ -1,3 +1,15 @@
+// please don't use these defines outside of this file in order to ensure a unified framework. unless you have a really good reason to make them global, then whatever
+
+// these four are just text spans that furnish the TEXT itself with the appropriate CSS classes
+#define MAJOR_ANNOUNCEMENT_TITLE(string) ("" + string + "")
+#define MAJOR_ANNOUNCEMENT_TEXT(string) ("" + string + "")
+#define MINOR_ANNOUNCEMENT_TITLE(string) ("" + string + "")
+#define MINOR_ANNOUNCEMENT_TEXT(string) ("" + string + "")
+
+// these two are the ones that actually give the striped background
+#define CHAT_ALERT_DEFAULT_SPAN(string) ("
" + string + "
")
+#define CHAT_ALERT_COLORED_SPAN(color, string) ("" + string + "
")
+
/**
* Make a big red text announcement to
*
@@ -13,7 +25,7 @@
* * text - required, the text to announce
* * title - optional, the title of the announcement.
* * sound - optional, the sound played accompanying the announcement
- * * type - optional, the type of the announcement, for some "preset" announcement templates. "Priority", "Captain", "Syndicate Captain"
+ * * type - optional, the type of the announcement, for some "preset" announcement templates. See __DEFINES/announcements.dm
* * sender_override - optional, modifies the sender of the announcement
* * has_important_message - is this message critical to the game (and should not be overridden by station traits), or not
* * players - a list of all players to send the message to. defaults to all players (not including new players)
@@ -31,66 +43,44 @@
if(!length(text))
return
- var/announcement
+ var/list/announcement_strings = list()
+
if(!sound)
sound = SSstation.announcer.get_rand_alert_sound()
else if(SSstation.announcer.event_sounds[sound])
sound = SSstation.announcer.event_sounds[sound]
- announcement += "
"
-
- if(type == "Priority")
- announcement += "[span_priorityannounce("Priority Announcement")]"
- if (title && length(title) > 0)
- announcement += "[span_prioritytitle("
[title]")]"
- else if(type == "Captain")
- announcement += "[span_priorityannounce("Captain Announces")]"
- GLOB.news_network.submit_article(text, "Captain's Announcement", "Station Announcements", null)
- else if(type == "Syndicate Captain")
- announcement += "[span_priorityannounce("Syndicate Captain Announces")]"
-
- else
- if(!sender_override)
- announcement += "[span_priorityannounce("[command_name()] Update")]"
+ var/header
+ switch(type)
+ if(ANNOUNCEMENT_TYPE_PRIORITY)
+ header = MAJOR_ANNOUNCEMENT_TITLE("Priority Announcement")
+ if(length(title) > 0)
+ header += MINOR_ANNOUNCEMENT_TITLE(title)
+ if(ANNOUNCEMENT_TYPE_CAPTAIN)
+ header = MAJOR_ANNOUNCEMENT_TITLE("Captain's Announcement")
+ GLOB.news_network.submit_article(text, "Captain's Announcement", "Station Announcements", null)
+ if(ANNOUNCEMENT_TYPE_SYNDICATE)
+ header = MAJOR_ANNOUNCEMENT_TITLE("Syndicate Captain's Announcement")
else
- announcement += "[span_priorityannounce("[sender_override]")]"
- if (title && length(title) > 0)
- announcement += "[span_prioritytitle("
[title]")]"
+ header += generate_unique_announcement_header(title, sender_override)
- if(!sender_override)
- if(title == "")
- GLOB.news_network.submit_article(text, "Central Command Update", "Station Announcements", null)
- else
- GLOB.news_network.submit_article(title + "
" + text, "Central Command", "Station Announcements", null)
+ announcement_strings += header
///If the announcer overrides alert messages, use that message.
if(SSstation.announcer.custom_alert_message && !has_important_message)
- announcement += "[span_priorityalert("
[SSstation.announcer.custom_alert_message]
")]"
+ announcement_strings += SSstation.announcer.custom_alert_message
else
- announcement += "[span_priorityalert("
[text]
")]"
-
- announcement += "
"
+ announcement_strings += MAJOR_ANNOUNCEMENT_TEXT(text)
- if(!players)
- players = GLOB.player_list
- // SKYRAT EDIT CHANGE BEGIN - ANNOUNCEMENTS
- /* Original
- if(target.client.prefs.read_preference(/datum/preference/toggle/sound_announcements))
- SEND_SOUND(target, sound_to_play)
- */
- if(!sound)
- sound = SSstation.announcer.get_rand_alert_sound()
- else if(SSstation.announcer.event_sounds[sound])
- var/list/announcer_key = SSstation.announcer.event_sounds[sound]
- sound = pick(announcer_key)
+ var/finalized_announcement = CHAT_ALERT_DEFAULT_SPAN(jointext(announcement_strings, "
"))
- var/sound_to_play = sound(sound)
- for(var/mob/target in players)
- if(!isnewplayer(target) && target.can_hear())
- to_chat(target, announcement)
+ dispatch_announcement_to_players(finalized_announcement, players, sound)
- alert_sound_to_playing(sound_to_play, players = players)
- // SKYRAT EDIT CHANGE END - ANNOUNCEMENTS
+ if(isnull(sender_override))
+ if(length(title) > 0)
+ GLOB.news_network.submit_article(title + "
" + text, "Central Command", "Station Announcements", null)
+ else
+ GLOB.news_network.submit_article(text, "Central Command Update", "Station Announcements", null)
/proc/print_command_report(text = "", title = null, announce=TRUE)
if(!title)
@@ -118,7 +108,7 @@
* sound_override - optional, use the passed sound file instead of the default notice sounds.
* should_play_sound - Whether the notice sound should be played or not.
*/
-/proc/minor_announce(message, title = "Attention:", alert, html_encode = TRUE, list/players = null, sound_override = null, should_play_sound = TRUE)
+/proc/minor_announce(message, title = "Attention:", alert = FALSE, html_encode = TRUE, list/players = null, sound_override = null, should_play_sound = TRUE)
if(!message)
return
@@ -126,29 +116,97 @@
title = html_encode(title)
message = html_encode(message)
+ var/list/minor_announcement_strings = list()
+ minor_announcement_strings += MINOR_ANNOUNCEMENT_TITLE(title)
+ minor_announcement_strings += MINOR_ANNOUNCEMENT_TEXT(message)
+
+ var/finalized_announcement = CHAT_ALERT_DEFAULT_SPAN(jointext(minor_announcement_strings, "
"))
+
+ var/custom_sound = sound_override || (alert ? 'modular_skyrat/modules/alerts/sound/alerts/alert1.ogg' : 'sound/misc/notice2.ogg') // SKYRAT EDIT CHANGE - CUSTOM ANNOUNCEMENTS - Original: 'sound/misc/notice1.ogg'
+ dispatch_announcement_to_players(finalized_announcement, players, custom_sound, should_play_sound)
+
+/// Sends an announcement about the level changing to players. Uses the passed in datum and the subsystem's previous security level to generate the message.
+/proc/level_announce(datum/security_level/selected_level, previous_level_number)
+ var/current_level_number = selected_level.number_level
+ var/current_level_name = selected_level.name
+ var/current_level_color = selected_level.announcement_color
+ var/current_level_sound = selected_level.sound
+
+ var/title
+ var/message
+
+ if(current_level_number > previous_level_number)
+ title = "Attention! Security level elevated to [current_level_name]:"
+ message = selected_level.elevating_to_announcement
+ else
+ title = "Attention! Security level lowered to [current_level_name]:"
+ message = selected_level.lowering_to_announcement
+
+ var/list/level_announcement_strings = list()
+ level_announcement_strings += MINOR_ANNOUNCEMENT_TITLE(title)
+ level_announcement_strings += MINOR_ANNOUNCEMENT_TEXT(message)
+
+ var/finalized_announcement = CHAT_ALERT_COLORED_SPAN(current_level_color, jointext(level_announcement_strings, "
"))
+
+ dispatch_announcement_to_players(finalized_announcement, GLOB.player_list, current_level_sound)
+
+/// Proc that just generates a custom header based on variables fed into `priority_announce()`
+/// Will return a string.
+/proc/generate_unique_announcement_header(title, sender_override)
+ var/list/returnable_strings = list()
+ if(isnull(sender_override))
+ returnable_strings += MAJOR_ANNOUNCEMENT_TITLE("[command_name()] Update")
+ else
+ returnable_strings += MAJOR_ANNOUNCEMENT_TITLE(sender_override)
+
+ if(length(title) > 0)
+ returnable_strings += MINOR_ANNOUNCEMENT_TITLE(title)
+
+ return jointext(returnable_strings, "
")
+
+/// Proc that just dispatches the announcement to our applicable audience. Only the announcement is a mandatory arg.
+/proc/dispatch_announcement_to_players(announcement, list/players, sound_override = null, should_play_sound = TRUE)
if(!players)
players = GLOB.player_list
+ // SKYRAT EDIT CHANGE BEGIN - CUSTOM ANNOUNCEMENTS
+ /* Original:
+
+ var/sound_to_play = !isnull(sound_override) ? sound_override : 'sound/misc/notice2.ogg'
+
for(var/mob/target in players)
- if(isnewplayer(target))
+ if(isnewplayer(target) || !target.can_hear())
continue
- if(!target.can_hear())
+
+ to_chat(target, announcement)
+ if(!should_play_sound)
continue
- to_chat(target, "
[span_minorannounce(title)]
")
- to_chat(target, "[span_minoralert(message)]
")
- // SKYRAT EDIT CHANGE START - ANNOUNCEMENTS
- /* Original
- if(should_play_sound && target.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements))
- var/sound_to_play = sound_override || (alert ? 'sound/misc/notice1.ogg' : 'sound/misc/notice2.ogg')
+ if(target.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements))
SEND_SOUND(target, sound(sound_to_play))
*/
- if(sound_override)
- if(SSstation.announcer.event_sounds[sound_override])
- var/list/announcement_key = SSstation.announcer.event_sounds[sound_override]
- sound_override = pick(announcement_key)
+ if(!sound_override)
+ sound_override = SSstation.announcer.get_rand_alert_sound()
+ else if(SSstation.announcer.event_sounds[sound_override])
+ var/list/announcer_key = SSstation.announcer.event_sounds[sound_override]
+ sound_override = pick(announcer_key)
+
+ if(!isnull(sound_override))
+ sound_override = sound(sound_override)
- var/sound_to_play = sound_override || (alert ? 'modular_skyrat/modules/alerts/sound/alerts/alert1.ogg' : 'sound/misc/notice2.ogg')
+ var/sound_to_play = !isnull(sound_override) ? sound_override : 'sound/misc/notice2.ogg'
alert_sound_to_playing(sound_to_play, players = players)
- // SKYRAT EDIT CHANGE END - ANNOUNCEMENTS
+ for(var/mob/target in players)
+ if(isnewplayer(target) || !target.can_hear())
+ continue
+
+ to_chat(target, announcement)
+ // SKYRAT EDIT CHANGE END - CUSTOM ANNOUNCEMENTS
+
+#undef MAJOR_ANNOUNCEMENT_TITLE
+#undef MAJOR_ANNOUNCEMENT_TEXT
+#undef MINOR_ANNOUNCEMENT_TITLE
+#undef MINOR_ANNOUNCEMENT_TEXT
+#undef CHAT_ALERT_DEFAULT_SPAN
+#undef CHAT_ALERT_COLORED_SPAN
diff --git a/code/controllers/subsystem/communications.dm b/code/controllers/subsystem/communications.dm
index 19939880d74..1e8b8a70604 100644
--- a/code/controllers/subsystem/communications.dm
+++ b/code/controllers/subsystem/communications.dm
@@ -38,9 +38,9 @@ SUBSYSTEM_DEF(communications)
else
var/list/message_data = user.treat_message(input)
if(syndicate)
- priority_announce(html_decode(message_data["message"]), null, 'sound/misc/announce_syndi.ogg', "Syndicate Captain", has_important_message = TRUE, players = players)
+ priority_announce(html_decode(message_data["message"]), null, 'sound/misc/announce_syndi.ogg', ANNOUNCEMENT_TYPE_SYNDICATE, has_important_message = TRUE, players = players)
else
- priority_announce(html_decode(message_data["message"]), null, ANNOUNCER_CAPTAIN, "Captain", has_important_message = TRUE, players = players) // SKYRAT EDIT CHANGE - Announcer Sounds
+ priority_announce(html_decode(message_data["message"]), null, ANNOUNCER_CAPTAIN, ANNOUNCEMENT_TYPE_CAPTAIN, has_important_message = TRUE, players = players) // SKYRAT EDIT CHANGE - 'sound/misc/announce.ogg' to ANNOUNCER_CAPTAIN
COOLDOWN_START(src, nonsilicon_message_cooldown, COMMUNICATION_COOLDOWN)
user.log_talk(input, LOG_SAY, tag="priority announcement")
message_admins("[ADMIN_LOOKUPFLW(user)] has made a priority announcement.")
diff --git a/code/controllers/subsystem/security_level.dm b/code/controllers/subsystem/security_level.dm
index d4fb13d9988..b82a113d4fa 100644
--- a/code/controllers/subsystem/security_level.dm
+++ b/code/controllers/subsystem/security_level.dm
@@ -39,7 +39,7 @@ SUBSYSTEM_DEF(security_level)
if(!selected_level)
CRASH("set_level was called with an invalid security level([new_level])")
- announce_security_level(selected_level) // We want to announce BEFORE updating to the new level
+ level_announce(selected_level, current_security_level.number_level) // We want to announce BEFORE updating to the new level
SSsecurity_level.current_security_level = selected_level
@@ -56,18 +56,6 @@ SUBSYSTEM_DEF(security_level)
SSnightshift.check_nightshift()
SSblackbox.record_feedback("tally", "security_level_changes", 1, selected_level.name)
-/**
- * Handles announcements of the newly set security level
- *
- * Arguments:
- * * selected_level - The new security level that has been set
- */
-/datum/controller/subsystem/security_level/proc/announce_security_level(datum/security_level/selected_level)
- if(selected_level.number_level > current_security_level.number_level) // We are elevating to this level.
- minor_announce(selected_level.elevating_to_announcemnt, "Attention! Security level elevated to [selected_level.name]:", sound_override = selected_level.sound)
- else // Going down
- minor_announce(selected_level.lowering_to_announcement, "Attention! Security level lowered to [selected_level.name]:", sound_override = selected_level.sound)
-
/**
* Returns the current security level as a number
*/
diff --git a/code/controllers/subsystem/shuttle.dm b/code/controllers/subsystem/shuttle.dm
index 45a17054647..eee808e9f4e 100644
--- a/code/controllers/subsystem/shuttle.dm
+++ b/code/controllers/subsystem/shuttle.dm
@@ -521,13 +521,13 @@ SUBSYSTEM_DEF(shuttle)
emergency.sound_played = FALSE
priority_announce("Hostile environment detected. \
Departure has been postponed indefinitely pending \
- conflict resolution.", null, 'sound/misc/notice1.ogg', "Priority")
+ conflict resolution.", null, 'sound/misc/notice1.ogg', ANNOUNCEMENT_TYPE_PRIORITY)
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, "Priority")
+ null, ANNOUNCER_SHUTTLEDOCK, ANNOUNCEMENT_TYPE_PRIORITY)
//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)
diff --git a/code/modules/security_levels/security_level_datums.dm b/code/modules/security_levels/security_level_datums.dm
index 175b79d1c87..b3402f643c6 100644
--- a/code/modules/security_levels/security_level_datums.dm
+++ b/code/modules/security_levels/security_level_datums.dm
@@ -9,6 +9,8 @@
/datum/security_level
/// The name of this security level.
var/name = "not set"
+ /// The color of our announcement divider.
+ var/announcement_color = "default"
/// The numerical level of this security level, see defines for more information.
var/number_level = -1
/// The sound that we will play when this security level is set
@@ -22,7 +24,7 @@
/// Our announcement when lowering to this level
var/lowering_to_announcement
/// Our announcement when elevating to this level
- var/elevating_to_announcemnt
+ var/elevating_to_announcement
/// Our configuration key for lowering to text, if set, will override the default lowering to announcement.
var/lowering_to_configuration_key
/// Our configuration key for elevating to text, if set, will override the default elevating to announcement.
@@ -33,7 +35,7 @@
if(lowering_to_configuration_key) // I'm not sure about you, but isn't there an easier way to do this?
lowering_to_announcement = global.config.Get(lowering_to_configuration_key)
if(elevating_to_configuration_key)
- elevating_to_announcemnt = global.config.Get(elevating_to_configuration_key)
+ elevating_to_announcement = global.config.Get(elevating_to_configuration_key)
/**
* GREEN
@@ -42,6 +44,7 @@
*/
/datum/security_level/green
name = "green"
+ announcement_color = "green"
sound = 'sound/misc/notice2.ogg' // Friendly beep
number_level = SEC_LEVEL_GREEN
lowering_to_configuration_key = /datum/config_entry/string/alert_green
@@ -54,6 +57,7 @@
*/
/datum/security_level/blue
name = "blue"
+ announcement_color = "blue"
sound = 'sound/misc/notice1.ogg' // Angry alarm
number_level = SEC_LEVEL_BLUE
lowering_to_configuration_key = /datum/config_entry/string/alert_blue_downto
@@ -67,6 +71,7 @@
*/
/datum/security_level/red
name = "red"
+ announcement_color = "red"
sound = 'sound/misc/notice3.ogg' // More angry alarm
number_level = SEC_LEVEL_RED
lowering_to_configuration_key = /datum/config_entry/string/alert_red_downto
@@ -80,6 +85,7 @@
*/
/datum/security_level/delta
name = "delta"
+ announcement_color = "purple"
sound = 'sound/misc/airraid.ogg' // Air alarm to signify importance
number_level = SEC_LEVEL_DELTA
elevating_to_configuration_key = /datum/config_entry/string/alert_delta
diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm
index ab2be975307..7266f5eb7db 100644
--- a/code/modules/shuttle/emergency.dm
+++ b/code/modules/shuttle/emergency.dm
@@ -358,9 +358,8 @@
else
SSshuttle.emergency_last_call_loc = null
-
if(!silent) // SKYRAT EDIT ADDITION
- priority_announce("The emergency shuttle has been called. [red_alert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergency_last_call_loc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ][SSshuttle.admin_emergency_no_recall ? "\n\nWarning: Shuttle recall subroutines disabled; Recall not possible." : ""]", null, ANNOUNCER_SHUTTLECALLED, "Priority")
+ priority_announce("The emergency shuttle has been called. [red_alert ? "Red Alert state confirmed: Dispatching priority shuttle. " : "" ]It will arrive in [timeLeft(600)] minutes.[reason][SSshuttle.emergency_last_call_loc ? "\n\nCall signal traced. Results can be viewed on any communications console." : "" ][SSshuttle.admin_emergency_no_recall ? "\n\nWarning: Shuttle recall subroutines disabled; Recall not possible." : ""]", null, ANNOUNCER_SHUTTLECALLED, ANNOUNCEMENT_TYPE_PRIORITY)
/obj/docking_port/mobile/emergency/cancel(area/signalOrigin)
if(mode != SHUTTLE_CALL)
@@ -375,7 +374,7 @@
SSshuttle.emergency_last_call_loc = signalOrigin
else
SSshuttle.emergency_last_call_loc = null
- priority_announce("The emergency shuttle has been recalled.[SSshuttle.emergency_last_call_loc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]", null, ANNOUNCER_SHUTTLERECALLED, "Priority")
+ priority_announce("The emergency shuttle has been recalled.[SSshuttle.emergency_last_call_loc ? " Recall signal traced. Results can be viewed on any communications console." : "" ]", null, ANNOUNCER_SHUTTLERECALLED, ANNOUNCEMENT_TYPE_PRIORITY)
SSticker.emergency_reason = null
@@ -464,7 +463,7 @@
mode = SHUTTLE_DOCKED
setTimer(SSshuttle.emergency_dock_time)
send2adminchat("Server", "The Emergency Shuttle has docked with the station.")
- priority_announce("[SSshuttle.emergency] has docked with the station. You have [timeLeft(600)] minutes to board the Emergency Shuttle.", null, ANNOUNCER_SHUTTLEDOCK, "Priority")
+ priority_announce("[SSshuttle.emergency] has docked with the station. You have [timeLeft(600)] minutes to board the Emergency Shuttle.", null, ANNOUNCER_SHUTTLEDOCK, ANNOUNCEMENT_TYPE_PRIORITY)
ShuttleDBStuff()
addtimer(CALLBACK(src, PROC_REF(announce_shuttle_events)), 20 SECONDS)
@@ -517,7 +516,7 @@
mode = SHUTTLE_ESCAPE
launch_status = ENDGAME_LAUNCHED
setTimer(SSshuttle.emergency_escape_time * engine_coeff)
- priority_announce("The Emergency Shuttle has left the station. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.", null, ANNOUNCER_SHUTTLELEFT, "Priority")
+ priority_announce("The Emergency Shuttle has left the station. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.", null, null, ANNOUNCEMENT_TYPE_PRIORITY)
INVOKE_ASYNC(SSticker, TYPE_PROC_REF(/datum/controller/subsystem/ticker, poll_hearts))
bolt_all_doors() //SKYRAT EDIT ADDITION
SSmapping.mapvote() //If no map vote has been run yet, start one.
@@ -585,7 +584,7 @@
mode = SHUTTLE_ESCAPE
launch_status = ENDGAME_LAUNCHED
setTimer(SSshuttle.emergency_escape_time)
- priority_announce("The Emergency Shuttle is preparing for direct jump. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.", null, null, "Priority")
+ priority_announce("The Emergency Shuttle is preparing for direct jump. Estimate [timeLeft(600)] minutes until the shuttle docks at Central Command.", null, null, ANNOUNCEMENT_TYPE_PRIORITY)
///Generate a list of events to run during the departure
/obj/docking_port/mobile/emergency/proc/setup_shuttle_events()
diff --git a/modular_skyrat/modules/airlock_override/code/airlock_override.dm b/modular_skyrat/modules/airlock_override/code/airlock_override.dm
index add9454b30c..cad26123ce5 100644
--- a/modular_skyrat/modules/airlock_override/code/airlock_override.dm
+++ b/modular_skyrat/modules/airlock_override/code/airlock_override.dm
@@ -135,7 +135,7 @@ GLOBAL_VAR_INIT(force_eng_override, FALSE)
/proc/toggle_eng_override()
if(!GLOB.force_eng_override)
GLOB.force_eng_override = TRUE
- minor_announce("Engineering staff will have expanded access to areas of the station during the emergency.", "Engineering Emergency")
+ minor_announce("Engineering staff will have expanded access to areas of the station during the emergency.", "Engineering Emergency", sound_override = 'sound/misc/notice1.ogg')
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_FORCE_ENG_OVERRIDE, TRUE)
SSblackbox.record_feedback("nested tally", "keycard_auths", 1, list("engineer override access", "enabled"))
else
diff --git a/modular_skyrat/modules/alerts/code/security_level_datums.dm b/modular_skyrat/modules/alerts/code/security_level_datums.dm
index 0e50d3bfd52..98b41d61ddd 100644
--- a/modular_skyrat/modules/alerts/code/security_level_datums.dm
+++ b/modular_skyrat/modules/alerts/code/security_level_datums.dm
@@ -12,6 +12,7 @@
sound = 'modular_skyrat/modules/alerts/sound/security_levels/red.ogg'
/datum/security_level/delta
+ announcement_color = "default"
lowering_to_configuration_key = /datum/config_entry/string/alert_delta_downto
elevating_to_configuration_key = /datum/config_entry/string/alert_delta_upto
sound = 'modular_skyrat/modules/alerts/sound/security_levels/delta.ogg'
@@ -26,6 +27,7 @@
*/
/datum/security_level/violet
name = "violet"
+ announcement_color = "purple"
number_level = SEC_LEVEL_VIOLET
lowering_to_configuration_key = /datum/config_entry/string/alert_violet_downto
elevating_to_configuration_key = /datum/config_entry/string/alert_violet_upto
@@ -39,6 +41,7 @@
*/
/datum/security_level/orange
name = "orange"
+ announcement_color = "orange"
number_level = SEC_LEVEL_ORANGE
lowering_to_configuration_key = /datum/config_entry/string/alert_orange_downto
elevating_to_configuration_key = /datum/config_entry/string/alert_orange_upto
@@ -53,6 +56,7 @@
/datum/security_level/amber
name = "amber"
+ announcement_color = "yellow"
number_level = SEC_LEVEL_AMBER
lowering_to_configuration_key = /datum/config_entry/string/alert_amber_downto
elevating_to_configuration_key = /datum/config_entry/string/alert_amber_upto
@@ -67,6 +71,7 @@
*/
/datum/security_level/gamma
name = "gamma"
+ announcement_color = "pink"
number_level = SEC_LEVEL_GAMMA
elevating_to_configuration_key = /datum/config_entry/string/alert_gamma
shuttle_call_time_mod = 0.25
diff --git a/tgstation.dme b/tgstation.dme
index 1c76882cd77..06d64820e51 100644
--- a/tgstation.dme
+++ b/tgstation.dme
@@ -35,6 +35,7 @@
#include "code\__DEFINES\airlock.dm"
#include "code\__DEFINES\alarm.dm"
#include "code\__DEFINES\alerts.dm"
+#include "code\__DEFINES\announcements.dm"
#include "code\__DEFINES\anomaly.dm"
#include "code\__DEFINES\antagonists.dm"
#include "code\__DEFINES\apc_defines.dm"
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
index 2d25303e179..7c944dc5dae 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-dark.scss
@@ -3,6 +3,8 @@
* SPDX-License-Identifier: MIT
*/
+@use 'sass:map';
+
em {
font-style: normal;
font-weight: bold;
@@ -1042,6 +1044,73 @@ em {
border-bottom: 1px dashed #fff;
}
+.major_announcement_title {
+ color: #ff0066;
+ text-decoration: underline;
+ font-weight: bold;
+ font-size: 175%;
+}
+
+.major_announcement_text {
+ color: #eaeaea;
+ font-weight: bold;
+ font-size: 125%;
+}
+
+.minor_announcement_title {
+ color: #33d5ff;
+ font-weight: bold;
+ font-size: 150%;
+}
+
+.minor_announcement_text {
+ color: #eaeaea;
+ font-size: 125%;
+}
+
+$alert-stripe-colors: (
+ 'default': #292929,
+ 'green': #003d00,
+ 'blue': #00283a,
+ 'pink': #30001b,
+ 'yellow': #574a00,
+ 'orange': #593400,
+ 'red': #540000,
+ 'purple': #2c0030,
+);
+
+$alert-background-colors: (
+ 'default': #252525,
+ 'green': #003800,
+ 'blue': #003045,
+ 'pink': #400025,
+ 'yellow': #4d4100,
+ 'orange': #6b4200,
+ 'red': #6b0000,
+ 'purple': #3a0040,
+);
+
+@each $color-name, $color-value in $alert-stripe-colors {
+ .chat_alert_#{$color-name} {
+ color: #ffffff;
+ padding: 0.5em 0.5em;
+ margin-bottom: 0.5em;
+ box-shadow: none;
+ font-weight: bold;
+ border: 1px solid $color-value;
+ margin: 0.5em 0 0.5em 0;
+ padding: 0.5em 0.75em;
+ background-color: map.get($alert-background-colors, $color-name);
+ background-image: repeating-linear-gradient(
+ -45deg,
+ transparent,
+ transparent 10px,
+ $color-value 10px,
+ $color-value 20px
+ );
+ }
+}
+
/* SKYRAT DARK MODE CLASSES */
.mentor {
color: #8a2be2;
diff --git a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
index f2bea2d08a8..3b80b3b98e7 100644
--- a/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
+++ b/tgui/packages/tgui-panel/styles/tgchat/chat-light.scss
@@ -3,6 +3,8 @@
* SPDX-License-Identifier: MIT
*/
+@use 'sass:map';
+
html,
body {
padding: 0;
@@ -975,6 +977,73 @@ h2.alert {
border-bottom: 1px dashed #000;
}
+.major_announcement_title {
+ color: #ff0066;
+ text-decoration: underline;
+ font-weight: bold;
+ font-size: 175%;
+}
+
+.major_announcement_text {
+ color: #202020;
+ font-weight: bold;
+ font-size: 125%;
+}
+
+.minor_announcement_title {
+ color: #007ee6;
+ font-weight: bold;
+ font-size: 150%;
+}
+
+.minor_announcement_text {
+ color: #202020;
+ font-size: 125%;
+}
+
+$alert-stripe-colors: (
+ 'default': #dedede,
+ 'green': #c2ffcc,
+ 'blue': #b8e6ff,
+ 'pink': #ffc2f4,
+ 'yellow': #ffe880,
+ 'orange': #ffbb99,
+ 'red': #ff99aa,
+ 'purple': #d7c2ff,
+);
+
+$alert-background-colors: (
+ 'default': #d1d1d1,
+ 'green': #a8ffb7,
+ 'blue': #a8e1ff,
+ 'pink': #ffb3f3,
+ 'yellow': #fff0ad,
+ 'orange': #ffc9ad,
+ 'red': #ffadbb,
+ 'purple': #ccb3ff,
+);
+
+@each $color-name, $color-value in $alert-stripe-colors {
+ .chat_alert_#{$color-name} {
+ color: #ffffff;
+ padding: 0.5em 0.5em;
+ margin-bottom: 0.5em;
+ box-shadow: none;
+ font-weight: bold;
+ border: 1px solid $color-value;
+ margin: 0.5em 0 0.5em 0;
+ padding: 0.5em 0.75em;
+ background-color: map.get($alert-background-colors, $color-name);
+ background-image: repeating-linear-gradient(
+ -45deg,
+ transparent,
+ transparent 10px,
+ $color-value 10px,
+ $color-value 20px
+ );
+ }
+}
+
/* SKYRAT LIGHT MODE CLASSES */
.mentor {
color: #8a2be2;
@@ -1072,6 +1141,7 @@ h2.alert {
font-weight: bold;
animation: glossy 5000ms infinite;
}
+
@keyframes glossy {
0% {
color: #9b6000;