Merge pull request #4314 from Crazylemon64/autosay_fix

Fixes autosay to no longer create AIs for their messages
This commit is contained in:
Fox McCloud
2016-04-28 20:23:37 -04:00
3 changed files with 18 additions and 4 deletions
+10 -4
View File
@@ -234,7 +234,7 @@ var/global/list/default_medbay_channels = list(
add_fingerprint(usr)
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = config.contact_levels) //BS12 EDIT
/obj/item/device/radio/proc/autosay(var/message, var/from, var/channel, var/zlevel = config.contact_levels, var/role = "Unknown") //BS12 EDIT
var/datum/radio_frequency/connection = null
if(channel && channels && channels.len > 0)
if (channel == "department")
@@ -248,9 +248,9 @@ var/global/list/default_medbay_channels = list(
return
if (!connection)
return
var/mob/living/silicon/ai/A = new /mob/living/silicon/ai(src, null, null, 1)
A.rename_character(A.real_name, from)
var/mob/living/automatedannouncer/A = new /mob/living/automatedannouncer(src)
A.name = from
A.role = role
Broadcast_Message(connection, A,
0, "*garbled automated announcement*", src,
message, from, "Automated Announcement", from, "synthesized voice",
@@ -258,6 +258,12 @@ var/global/list/default_medbay_channels = list(
qdel(A)
return
// Just a dummy mob used for making announcements, so we don't create AIs to do this
// I'm not sure who thought that was a good idea. -- Crazylemon
/mob/living/automatedannouncer
var/role = ""
universal_speak = 1
// Interprets the message mode when talking into a radio, possibly returning a connection datum
/obj/item/device/radio/proc/handle_message_mode(mob/living/M as mob, message, message_mode)
// If a channel isn't specified, send to common.
+3
View File
@@ -151,6 +151,9 @@
jobname = "Cyborg"
else if (ispAI(speaker))
jobname = "Personal AI"
else if (isAutoAnnouncer(speaker))
var/mob/living/automatedannouncer/AA = speaker
jobname = AA.role
else
jobname = "Unknown"
+5
View File
@@ -179,6 +179,11 @@ proc/isovermind(A)
return 1
return 0
/proc/isAutoAnnouncer(A)
if(istype(A, /mob/living/automatedannouncer))
return 1
return 0
/proc/isorgan(A)
if(istype(A, /obj/item/organ/external))
return 1