Files
Bubberstation/code/__HELPERS/priority_announce.dm
Seris02 a6f93b4f96 Some of the unsorted chat types being sorted (#55947)
The emote CSS class was no longer in use, it has been unitalicized and made into the actual emote class, back into local.
    A CSS class for info has been created which has no special CSS.
    The who verb has been put into info. (infoplain CSS class)
    PDA message receiving has been put into info (PDA message sending was already in info). (infoplain CSS class)
    Supply radio has been properly placed into radio.
    Service radio has been properly placed into radio.
    Binary talk has been placed into radio.
    A CSS class for minor announcements has been created.
    Minor announcements (shuttle purchases, head of staff office announcements, silicon announcements, etc) have been placed into radio (major announcements are already in radio). (minorannounce CSS class)
2021-01-06 12:20:40 -03:00

68 lines
2.2 KiB
Plaintext

/proc/priority_announce(text, title = "", sound = 'sound/ai/attention.ogg', type , sender_override)
if(!text)
return
var/announcement
if(type == "Priority")
announcement += "<h1 class='alert'>Priority Announcement</h1>"
if (title && length(title) > 0)
announcement += "<br><h2 class='alert'>[html_encode(title)]</h2>"
else if(type == "Captain")
announcement += "<h1 class='alert'>Captain Announces</h1>"
GLOB.news_network.SubmitArticle(text, "Captain's Announcement", "Station Announcements", null)
else
if(!sender_override)
announcement += "<h1 class='alert'>[command_name()] Update</h1>"
else
announcement += "<h1 class='alert'>[sender_override]</h1>"
if (title && length(title) > 0)
announcement += "<br><h2 class='alert'>[html_encode(title)]</h2>"
if(!sender_override)
if(title == "")
GLOB.news_network.SubmitArticle(text, "Central Command Update", "Station Announcements", null)
else
GLOB.news_network.SubmitArticle(title + "<br><br>" + text, "Central Command", "Station Announcements", null)
announcement += "<br><span class='alert'>[html_encode(text)]</span><br>"
announcement += "<br>"
var/s = sound(sound)
for(var/mob/M in GLOB.player_list)
if(!isnewplayer(M) && M.can_hear())
to_chat(M, announcement)
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
SEND_SOUND(M, s)
/proc/print_command_report(text = "", title = null, announce=TRUE)
if(!title)
title = "Classified [command_name()] Update"
if(announce)
priority_announce("A report has been downloaded and printed out at all communications consoles.", "Incoming Classified Message", 'sound/ai/commandreport.ogg')
var/datum/comm_message/M = new
M.title = title
M.content = text
SScommunications.send_message(M)
/proc/minor_announce(message, title = "Attention:", alert, html_encode = TRUE)
if(!message)
return
if (html_encode)
title = html_encode(title)
message = html_encode(message)
for(var/mob/M in GLOB.player_list)
if(!isnewplayer(M) && M.can_hear())
to_chat(M, "<span class='minorannounce'><font color = red>[title]</font color><BR>[message]</span><BR>")
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
if(alert)
SEND_SOUND(M, sound('sound/misc/notice1.ogg'))
else
SEND_SOUND(M, sound('sound/misc/notice2.ogg'))