diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm
index ab500a9630..7aa359c2c4 100644
--- a/code/modules/mob/hear_say.dm
+++ b/code/modules/mob/hear_say.dm
@@ -19,7 +19,7 @@
if(language)
verb = language.speech_verb
style = language.colour
-
+
var/speaker_name = speaker.name
if(istype(speaker, /mob/living/carbon/human))
var/mob/living/carbon/human/H = speaker
@@ -71,7 +71,7 @@
verb = language.speech_verb
style = language.colour
-
+
if(hard_to_hear)
message = stars(message)
@@ -89,11 +89,28 @@
if(hard_to_hear)
speaker_name = "unknown"
+ var/changed_voice
+
if(istype(src, /mob/living/silicon/ai) && !hard_to_hear)
var/jobname // the mob's "job"
+ var/mob/living/carbon/human/impersonating //The crewmember being impersonated, if any.
+
if (ishuman(speaker))
var/mob/living/carbon/human/H = speaker
- jobname = H.get_assignment()
+
+ if((H.wear_id && istype(H.wear_id,/obj/item/weapon/card/id/syndicate)) && (H.wear_mask && istype(H.wear_mask,/obj/item/clothing/mask/gas/voice)))
+
+ changed_voice = 1
+ var/mob/living/carbon/human/I = locate(speaker_name)
+
+ if(I)
+ impersonating = I
+ jobname = impersonating.get_assignment()
+ else
+ jobname = "Unknown"
+ else
+ jobname = H.get_assignment()
+
else if (iscarbon(speaker)) // Nonhuman carbon mob
jobname = "No id"
else if (isAI(speaker))
@@ -105,7 +122,13 @@
else
jobname = "Unknown"
- track = "[speaker_name] ([jobname])"
+ if(changed_voice)
+ if(impersonating)
+ track = "[speaker_name] ([jobname])"
+ else
+ track = "[speaker_name] ([jobname])"
+ else
+ track = "[speaker_name] ([jobname])"
if(istype(src, /mob/dead/observer))
if(speaker_name != speaker.real_name && !isAI(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.
diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm
index 62331233a8..88c1c9b79d 100644
--- a/code/modules/mob/living/silicon/ai/ai.dm
+++ b/code/modules/mob/living/silicon/ai/ai.dm
@@ -94,7 +94,7 @@ var/list/ai_list = list()
/mob/living/silicon/ai/proc/ai_camera_list, /mob/living/silicon/ai/proc/ai_network_change, \
/mob/living/silicon/ai/proc/ai_statuschange, /mob/living/silicon/ai/proc/ai_hologram_change, \
/mob/living/silicon/ai/proc/toggle_camera_light)
-
+
if(!safety)//Only used by AIize() to successfully spawn an AI.
if (!B)//If there is no player/brain inside.
@@ -146,7 +146,7 @@ var/list/ai_list = list()
/obj/machinery/ai_powersupply
name="Power Supply"
active_power_usage=1000
- use_power = 2
+ use_power = 2
power_channel = EQUIP
var/mob/living/silicon/ai/powered_ai = null
invisibility = 100
@@ -155,12 +155,12 @@ var/list/ai_list = list()
powered_ai = ai
if(isnull(powered_ai))
Del()
-
+
loc = powered_ai.loc
use_power(1) // Just incase we need to wake up the power system.
..()
-
+
/obj/machinery/ai_powersupply/process()
if(!powered_ai || powered_ai.stat & DEAD)
Del()
@@ -410,8 +410,18 @@ var/list/ai_list = list()
if(A && target)
A.ai_actual_track(target)
*/
- if(target)
+
+ //Strip off any "(as Derplord)".
+ //If there's a way to do this via a var that doesn't give the AI extra info, please let me know.
+ var/seeking = target.name
+ var/index = findtext(seeking, "(as ")
+ if(index)
+ seeking = copytext(seeking, 1, index-1)
+
+ if(target && href_list["trackname"] == seeking)
ai_actual_track(target)
+ else
+ src << "\red System error. Cannot locate [href_list["trackname"]]."
return
else if (href_list["faketrack"])