[TGUI] Request Consoles (#14734)

* TGUI Request Consoles

* Mochi tewaks

* Else ill do this
This commit is contained in:
AffectedArc07
2020-10-26 19:25:26 +00:00
committed by GitHub
parent bfe2c9da00
commit 61328bdd76
5 changed files with 579 additions and 336 deletions
+20 -19
View File
@@ -86,31 +86,32 @@ GLOBAL_LIST_EMPTY(message_servers)
/obj/machinery/message_server/proc/send_rc_message(var/recipient = "",var/sender = "",var/message = "",var/stamp = "", var/id_auth = "", var/priority = 1)
rc_msgs += new/datum/data_rc_msg(recipient,sender,message,stamp,id_auth)
var/authmsg = "[message]<br>"
var/authmsg = "[message]"
if(id_auth)
authmsg += "[id_auth]<br>"
authmsg += " - [id_auth]"
if(stamp)
authmsg += "[stamp]<br>"
for(var/obj/machinery/requests_console/Console in GLOB.allRequestConsoles)
if(ckey(Console.department) == ckey(recipient))
if(Console.inoperable())
Console.message_log += "<B>Message lost due to console failure.</B><BR>Please contact [station_name()] system adminsitrator or AI for technical assistance.<BR>"
authmsg += " - [stamp]"
for(var/C in GLOB.allRequestConsoles)
var/obj/machinery/requests_console/RC = C
if(ckey(RC.department) == ckey(recipient))
if(RC.inoperable())
RC.message_log += "Message lost due to console failure. Please contact [station_name()]'s system administrator or AI for technical assistance."
continue
if(Console.newmessagepriority < priority)
Console.newmessagepriority = priority
Console.icon_state = "req_comp[priority]"
if(RC.newmessagepriority < priority)
RC.newmessagepriority = priority
RC.icon_state = "req_comp[priority]"
switch(priority)
if(2)
if(!Console.silent)
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
Console.atom_say("PRIORITY Alert in [sender]")
Console.message_log += "<B><FONT color='red'>High Priority message from <A href='?src=[Console.UID()];write=[sender]'>[sender]</A></FONT></B><BR>[authmsg]"
if(!RC.silent)
playsound(RC.loc, 'sound/machines/twobeep.ogg', 50, 1)
RC.atom_say("PRIORITY Alert in [sender]")
RC.message_log += "High Priority message from [sender]: [authmsg]"
else
if(!Console.silent)
playsound(Console.loc, 'sound/machines/twobeep.ogg', 50, 1)
Console.atom_say("Message from [sender]")
Console.message_log += "<B>Message from <A href='?src=[Console.UID()];write=[sender]'>[sender]</A></B><BR>[authmsg]"
Console.set_light(2)
if(!RC.silent)
playsound(RC.loc, 'sound/machines/twobeep.ogg', 50, 1)
RC.atom_say("Message from [sender]")
RC.message_log += "Message [sender]: [authmsg]"
RC.set_light(2)
/obj/machinery/message_server/attack_hand(user as mob)
// to_chat(user, "<span class='notice'>There seem to be some parts missing from this server. They should arrive on the station in a few days, give or take a few CentComm delays.</span>")