From 41e19a6e626faf6ee3da59ddc2095151cde36d81 Mon Sep 17 00:00:00 2001 From: Erthilo Date: Wed, 29 Aug 2012 22:36:36 +0100 Subject: [PATCH] Merged arrivals announcement computer. --- code/game/machinery/telecomms/broadcaster.dm | 6 +++++- .../game/objects/items/devices/radio/radio.dm | 21 +++++++++++++++++++ code/modules/mob/new_player/new_player.dm | 11 +++------- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/code/game/machinery/telecomms/broadcaster.dm b/code/game/machinery/telecomms/broadcaster.dm index fd163e72865..888ca7ae3f4 100644 --- a/code/game/machinery/telecomms/broadcaster.dm +++ b/code/game/machinery/telecomms/broadcaster.dm @@ -358,7 +358,11 @@ var/list/recentmessages = list() // global list of recent messages broadcasted : // --- Filter the message; place it in quotes apply a verb --- - var/quotedmsg = M.say_quote(message) + var/quotedmsg = "\"" + message + "\"" //BS12 EDIT For Arrivals Computer + if(job == "Automated Announcement") + quotedmsg = message + else if(M) + quotedmsg = M.say_quote(message) // --- This following recording is intended for research and feedback in the use of department radio channels --- diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index ed9b7a05f0a..01f5fe36c3f 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -195,6 +195,27 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use updateDialog() add_fingerprint(usr) +/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel) //BS12 EDIT + var/datum/radio_frequency/connection = null + if(channel && channels && channels.len > 0) + if (channel == "department") + //world << "DEBUG: channel=\"[channel]\" switching to \"[channels[1]]\"" + channel = channels[1] + connection = secure_radio_connections[channel] + else + connection = radio_connection + channel = null + if (!istype(connection)) + return + if (!connection) + return + + Broadcast_Message(connection, new /mob/living/silicon/ai(src), + 0, "*garbled automated announcement*", src, + message, from, "Automated Announcement", from, "synthesized voice", + 4, 0, 1) + return + /obj/item/device/radio/talk_into(mob/M as mob, message, channel) if(!on) return // the device has to be on diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index f4ceed41a3c..47cdf8f076a 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -321,14 +321,9 @@ proc/AnnounceArrival(var/mob/living/carbon/human/character, var/rank) if (ticker.current_state == GAME_STATE_PLAYING) - var/ailist[] = list() - for (var/mob/living/silicon/ai/A in living_mob_list) - ailist += A - if (ailist.len) - var/mob/living/silicon/ai/announcer = pick(ailist) - if(character.mind) - if((character.mind.assigned_role != "Cyborg") && (character.mind.special_role != "MODE")) - announcer.say("[character.real_name] has signed up as [rank].") + var/obj/item/device/radio/intercom/a = new /obj/item/device/radio/intercom(null)// BS12 EDIT Arrivals Announcement Computer, rather than the AI. + a.autosay("\"[character.real_name],[character.wear_id.assignment ? " [character.wear_id.assignment]," : "" ] has arrived on the station.\"", "Arrivals Announcement Computer") + del(a) proc/LateChoices() var/mills = world.time // 1/10 of a second, not real milliseconds but whatever