Replace 'magic' messages with Facility PA

This replaces the mystical messages of things like Command Reports, the 'All hands' message when a CD joins, and head announcements with a PA system that behaves more reasonably than pushing all the messages out of the chat box. Nothing about the systems changed, just the way they show up. They still make the sound, too.
This commit is contained in:
Arokha Sieyes
2017-04-25 14:06:03 -04:00
parent b7898c1eaf
commit 4c2caf11b7
3 changed files with 31 additions and 43 deletions

View File

@@ -13,3 +13,5 @@
#define VANTAG_VORE "vantag_vore" #define VANTAG_VORE "vantag_vore"
#define VANTAG_KIDNAP "vantag_kidnap" #define VANTAG_KIDNAP "vantag_kidnap"
#define VANTAG_KILL "vantag_kill" #define VANTAG_KILL "vantag_kill"
#define ANNOUNCER_NAME "Facility PA"

View File

@@ -1,3 +1,5 @@
//VOREStation Edit - Most of this file has been changed to use the Eris-style PA announcements.
//You'll need to compare externally, or use your best judgement when merging.
/var/datum/announcement/priority/priority_announcement = new(do_log = 0) /var/datum/announcement/priority/priority_announcement = new(do_log = 0)
/var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 1) /var/datum/announcement/priority/command/command_announcement = new(do_log = 0, do_newscast = 1)
@@ -47,38 +49,19 @@
Log(message, message_title) Log(message, message_title)
datum/announcement/proc/Message(message as text, message_title as text) datum/announcement/proc/Message(message as text, message_title as text)
for(var/mob/M in player_list) global_announcer.autosay("<span class='alert'>[message_title]:</span> [message]", announcer ? announcer : ANNOUNCER_NAME)
if(!istype(M,/mob/new_player) && !isdeaf(M))
M << "<h2 class='alert'>[title]</h2>"
M << "<span class='alert'>[message]</span>"
if (announcer)
M << "<span class='alert'> -[html_encode(announcer)]</span>"
datum/announcement/minor/Message(message as text, message_title as text) datum/announcement/minor/Message(message as text, message_title as text)
world << "<b>[message]</b>" global_announcer.autosay(message, announcer ? announcer : ANNOUNCER_NAME)
datum/announcement/priority/Message(message as text, message_title as text) datum/announcement/priority/Message(message as text, message_title as text)
world << "<h1 class='alert'>[message_title]</h1>" global_announcer.autosay("<span class='alert'>[message_title]:</span> [message]", announcer ? announcer : ANNOUNCER_NAME)
world << "<span class='alert'>[message]</span>"
if(announcer)
world << "<span class='alert'> -[html_encode(announcer)]</span>"
world << "<br>"
datum/announcement/priority/command/Message(message as text, message_title as text) datum/announcement/priority/command/Message(message as text, message_title as text)
var/command global_announcer.autosay("<span class='alert'>[command_name()] - [message_title]:</span> [message]", ANNOUNCER_NAME)
command += "<h1 class='alert'>[command_name()] Update</h1>"
if (message_title)
command += "<br><h2 class='alert'>[message_title]</h2>"
command += "<br><span class='alert'>[message]</span><br>"
command += "<br>"
for(var/mob/M in player_list)
if(!istype(M,/mob/new_player) && !isdeaf(M))
M << command
datum/announcement/priority/security/Message(message as text, message_title as text) datum/announcement/priority/security/Message(message as text, message_title as text)
world << "<font size=4 color='red'>[message_title]</font>" global_announcer.autosay("<span class='alert'>[message_title]:</span> [message]", ANNOUNCER_NAME)
world << "<font color='red'>[message]</font>"
datum/announcement/proc/NewsCast(message as text, message_title as text) datum/announcement/proc/NewsCast(message as text, message_title as text)
if(!newscast) if(!newscast)
@@ -131,4 +114,4 @@ datum/announcement/proc/Log(message as text, message_title as text)
AnnounceArrivalSimple(character.real_name, rank, join_message) AnnounceArrivalSimple(character.real_name, rank, join_message)
/proc/AnnounceArrivalSimple(var/name, var/rank = "visitor", var/join_message = "has arrived on the station") /proc/AnnounceArrivalSimple(var/name, var/rank = "visitor", var/join_message = "has arrived on the station")
global_announcer.autosay("[name], [rank], [join_message].", "Arrivals Announcement Computer") global_announcer.autosay("[name], [rank], [join_message].", ANNOUNCER_NAME)

View File

@@ -664,31 +664,34 @@ proc/admin_notice(var/message, var/rights)
log_admin("Announce: [key_name(usr)] : [message]") log_admin("Announce: [key_name(usr)] : [message]")
feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","A") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
//VOREStation Edit to this verb for the purpose of making it compliant with the annunciator system
var/datum/announcement/priority/admin_pri_announcer = new
var/datum/announcement/minor/admin_min_announcer = new
/datum/admins/proc/intercom() /datum/admins/proc/intercom()
set category = "Fun" set category = "Fun"
set name = "Intercom Msg" set name = "Intercom Msg"
set desc = "Send an intercom message, like an arrivals announcement." set desc = "Send an intercom message, like an arrivals announcement."
if(!check_rights(0)) return if(!check_rights(0)) return
//This is basically how death alarms do it var/sender = input("Name of sender (max 75):", "Intercom Msg", ANNOUNCER_NAME) as null|text
var/obj/item/device/radio/headset/a = new /obj/item/device/radio/headset/ert(null)
a.icon = 'icons/obj/radio.dmi' //VOREStation Tweak
a.icon_state = "intercom" //VOREStation Tweak
var/channel = input("Channel for message:","Channel", null) as null|anything in (list("Common") + a.keyslot1.channels + a.keyslot2.channels)
if(channel) //They picked a channel
var/sender = input("Name of sender (max 75):", "Announcement", "Announcement Computer") as null|text
if(sender) //They put a sender if(sender) //They put a sender
sender = sanitize(sender, 75, extra = 0) sender = sanitize(sender, 75, extra = 0)
var/message = input("Message content (max 500):", "Contents", "This is a test of the announcement system.") as null|message var/message = input("Message content (max 500):", "Contents", "This is a test of the announcement system.") as null|message
if(message) //They put a message if(message) //They put a message
message = sanitize(message, 500, extra = 0) message = sanitize(message, 500, extra = 0)
a.autosay("[message]", "[sender]", "[channel == "Common" ? null : channel]") //Common is a weird case, as it's not a "channel", it's just talking into a radio without a channel set. var/priority = alert("Priority or Normal?","Intercom Msg","Priority","Cancel","Normal")
log_admin("Intercom: [key_name(usr)] : [sender]:[message]") var/datum/announcement/A
qdel(a) switch(priority)
if("Priority")
A = admin_pri_announcer
if("Normal")
A = admin_min_announcer
if(A)
A.announcer = sender
A.Announce(message)
A.announcer = ""
log_admin("Intercom Verb: [key_name(usr)] : [sender]:[message]")
feedback_add_details("admin_verb","IN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! feedback_add_details("admin_verb","IN") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc!
/datum/admins/proc/toggleooc() /datum/admins/proc/toggleooc()