From 741b57191ddbca744377c7ac3d290bdaa69930e0 Mon Sep 17 00:00:00 2001 From: Fruerlund Date: Tue, 16 May 2017 16:04:29 +0200 Subject: [PATCH 1/3] Radio notifications When sending a request console message to a target. The target will now be notified over the corrosponding radio channel --- code/game/machinery/requests_console.dm | 26 ++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 476162a27a1..c62e88afc77 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -58,6 +58,8 @@ var/list/obj/machinery/requests_console/allConsoles = list() var/ship_tag_name = "" var/ship_tag_index = 0 var/print_cooldown = 0 //cooldown on shipping label printer, stores the in-game time of when the printer will next be ready + var/obj/item/device/radio/Radio + var/radiochannel = "" /obj/machinery/requests_console/power_change() ..() @@ -71,6 +73,10 @@ var/list/obj/machinery/requests_console/allConsoles = list() icon_state = "req_comp[newmessagepriority]" /obj/machinery/requests_console/New() + Radio = new /obj/item/device/radio(src) + Radio.listening = 1 + Radio.config(list("Engineering","Medical","Supply","Command","Science","Service","Security", "AI Private" = 0)) + Radio.follow_target = src ..() announcement.title = "[department] announcement" @@ -101,6 +107,7 @@ var/list/obj/machinery/requests_console/allConsoles = list() req_console_supplies -= department if(departmentType & RC_INFO) req_console_information -= department + QDEL_NULL(Radio) return ..() /obj/machinery/requests_console/attack_ghost(user as mob) @@ -189,7 +196,24 @@ var/list/obj/machinery/requests_console/allConsoles = list() pass = 1 if(pass) screen = RCS_SENTPASS - message_log += "Message sent to [recipient]
[message]" + if(recipient in list("Atmospherics","Mechanic","Engineering","Chief Engineer's Desk")) + radiochannel = "Engineering" + if(recipient in list("Warden","Security","Brig Medbay","Head of Security's Desk")) + radiochannel = "Security" + if(recipient in list("Bar","Chapel","Kitchen","Hydroponics","Janitorial")) + radiochannel = "Service" + if(recipient in list("Virology","Chief Medical Officer's Desk","Medbay",)) + radiochannel = "Medical" + if(recipient in list("Blueshield","NT Representative","Head of Personnel's Desk","Captain's Desk","Bridge")) + radiochannel = "Command" + if(recipient == "Cargo Bay") + radiochannel = "Supply" + if(recipient in list("Robotics","Science","Research Director's Desk")) + radiochannel = "Science" + if(recipient == "AI") + radiochannel = "AI Private" + message_log += "Message sent to [recipient] at [worldtime2text()]
[message]" + Radio.autosay("Alert, a new requests console message recieved for [recipient] from [department]", null, "[radiochannel]") else audible_message(text("[bicon(src)] *The Requests Console beeps: 'NOTICE: No server detected!'"),,4) From 151dc45edf706b92e09e4c0267b483370f24cb78 Mon Sep 17 00:00:00 2001 From: Fruerlund Date: Wed, 17 May 2017 10:51:12 +0200 Subject: [PATCH 2/3] Adds defines and removes the in list Performance related --- code/game/machinery/requests_console.dm | 26 ++++++++++++++++--------- 1 file changed, 17 insertions(+), 9 deletions(-) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index c62e88afc77..9a3de587259 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -19,6 +19,14 @@ #define RCS_SHIPPING 9 // Print Shipping Labels/Packages #define RCS_SHIP_LOG 10 // View Shipping Label Log +//Radio list +#define ENGI_ROLES list("Atmospherics","Mechanic","Engineering","Chief Engineer's Desk") +#define SEC_ROLES list("Warden","Security","Brig Medbay","Head of Security's Desk") +#define MISC_ROLES list("Bar","Chapel","Kitchen","Hydroponics","Janitorial") +#define MED_ROLES list("Virology","Chief Medical Officer's Desk","Medbay") +#define COM_ROLES list("Blueshield","NT Representative","Head of Personnel's Desk","Captain's Desk","Bridge") +#define SCI_ROLES list("Robotics","Science","Research Director's Desk") + var/req_console_assistance = list() var/req_console_supplies = list() var/req_console_information = list() @@ -196,24 +204,24 @@ var/list/obj/machinery/requests_console/allConsoles = list() pass = 1 if(pass) screen = RCS_SENTPASS - if(recipient in list("Atmospherics","Mechanic","Engineering","Chief Engineer's Desk")) + if(recipient in ENGI_ROLES) radiochannel = "Engineering" - if(recipient in list("Warden","Security","Brig Medbay","Head of Security's Desk")) + if(recipient in SEC_ROLES) radiochannel = "Security" - if(recipient in list("Bar","Chapel","Kitchen","Hydroponics","Janitorial")) + if(recipient in MISC_ROLES) radiochannel = "Service" - if(recipient in list("Virology","Chief Medical Officer's Desk","Medbay",)) + if(recipient in MED_ROLES) radiochannel = "Medical" - if(recipient in list("Blueshield","NT Representative","Head of Personnel's Desk","Captain's Desk","Bridge")) + if(recipient in COM_ROLES) radiochannel = "Command" - if(recipient == "Cargo Bay") - radiochannel = "Supply" - if(recipient in list("Robotics","Science","Research Director's Desk")) + if(recipient in SCI_ROLES) radiochannel = "Science" if(recipient == "AI") radiochannel = "AI Private" + if(recipient == "Cargo Bay") + radiochannel = "Supply" message_log += "Message sent to [recipient] at [worldtime2text()]
[message]" - Radio.autosay("Alert, a new requests console message recieved for [recipient] from [department]", null, "[radiochannel]") + Radio.autosay("Alert; a new requests console message received for [recipient] from [department]", null, "[radiochannel]") else audible_message(text("[bicon(src)] *The Requests Console beeps: 'NOTICE: No server detected!'"),,4) From 92775bfe38c5790c60d1c6d6a27aa3b1610b3783 Mon Sep 17 00:00:00 2001 From: Fruerlund Date: Tue, 23 May 2017 15:33:56 +0200 Subject: [PATCH 3/3] Adjusts for META --- code/game/machinery/requests_console.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index 9a3de587259..21e91f3759b 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -20,7 +20,7 @@ #define RCS_SHIP_LOG 10 // View Shipping Label Log //Radio list -#define ENGI_ROLES list("Atmospherics","Mechanic","Engineering","Chief Engineer's Desk") +#define ENGI_ROLES list("Atmospherics","Mechanic","Engineering","Chief Engineer's Desk","Telecoms Admin") #define SEC_ROLES list("Warden","Security","Brig Medbay","Head of Security's Desk") #define MISC_ROLES list("Bar","Chapel","Kitchen","Hydroponics","Janitorial") #define MED_ROLES list("Virology","Chief Medical Officer's Desk","Medbay")