Merged arrivals announcement computer.

This commit is contained in:
Erthilo
2012-08-29 22:36:36 +01:00
parent d585e25227
commit 41e19a6e62
3 changed files with 29 additions and 9 deletions

View File

@@ -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 ---

View File

@@ -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

View File

@@ -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