mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-01-29 02:21:44 +00:00
* Generates messages when xeno eggs are delivered 🆑 coiax add: The egg spawner on Metastation will generate a station message and inform the admins if an egg is spawned. (It's only a two percent chance, but live in hope.) /🆑 Metastation has a 2% egg spawner. If it picks the xeno egg, it does so silently, telling no one. Now it informs the station and also admins and the game log. To reiterate, this behaviour is already in the map, I'm just generating logging and messages. If admins want to simulate this, they can spawn a `/obj/effect/spawner/xeno_egg_delivery` in any location they like. * Xeno delivery makes a command report instead I also refactored command report to avoid the duplication of the SECRET COMMAND REPORT announcement.
61 lines
2.2 KiB
Plaintext
61 lines
2.2 KiB
Plaintext
/proc/priority_announce(text, title = "", sound = 'sound/AI/attention.ogg', type)
|
|
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>"
|
|
news_network.SubmitArticle(text, "Captain's Announcement", "Station Announcements", null)
|
|
|
|
else
|
|
announcement += "<h1 class='alert'>[command_name()] Update</h1>"
|
|
if (title && length(title) > 0)
|
|
announcement += "<br><h2 class='alert'>[html_encode(title)]</h2>"
|
|
if(title == "")
|
|
news_network.SubmitArticle(text, "Central Command Update", "Station Announcements", null)
|
|
else
|
|
news_network.SubmitArticle(title + "<br><br>" + text, "Central Command", "Station Announcements", null)
|
|
|
|
announcement += "<br><span class='alert'>[html_encode(text)]</span><br>"
|
|
announcement += "<br>"
|
|
|
|
for(var/mob/M in player_list)
|
|
if(!isnewplayer(M) && !M.ear_deaf)
|
|
to_chat(M, announcement)
|
|
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
|
|
M << sound(sound)
|
|
|
|
/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')
|
|
|
|
for(var/obj/machinery/computer/communications/C in machines)
|
|
if(!(C.stat & (BROKEN|NOPOWER)) && C.z == ZLEVEL_STATION)
|
|
var/obj/item/weapon/paper/P = new /obj/item/weapon/paper(C.loc)
|
|
P.name = "paper - '[title]'"
|
|
P.info = text
|
|
C.messagetitle.Add("[title]")
|
|
C.messagetext.Add(text)
|
|
P.update_icon()
|
|
|
|
/proc/minor_announce(message, title = "Attention:", alert)
|
|
if(!message)
|
|
return
|
|
|
|
for(var/mob/M in player_list)
|
|
if(!isnewplayer(M) && !M.ear_deaf)
|
|
to_chat(M, "<b><font size = 3><font color = red>[title]</font color><BR>[message]</font size></b><BR>")
|
|
if(M.client.prefs.toggles & SOUND_ANNOUNCEMENTS)
|
|
if(alert)
|
|
M << sound('sound/misc/notice1.ogg')
|
|
else
|
|
M << sound('sound/misc/notice2.ogg')
|