From 741b57191ddbca744377c7ac3d290bdaa69930e0 Mon Sep 17 00:00:00 2001 From: Fruerlund Date: Tue, 16 May 2017 16:04:29 +0200 Subject: [PATCH] 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)