Add [OPEN] option for AI in radio messages

Also mildly refactors hear_radio to kill those nasty istype(src)'s.

This makes an [OPEN] link appear on all radio messages the AI hears (to
the right of the follow link). When clicked, it allows the AI to open
the door nearest to the speaker (or, if it is a voice changer, the door
nearest to the poor sap who had his voice stolen)
This commit is contained in:
Tigercat2000
2017-02-17 17:43:33 -08:00
parent e0b23a1e10
commit b2868c31e0
4 changed files with 132 additions and 108 deletions
+9
View File
@@ -37,3 +37,12 @@
return
. = src.emote_dead(message)
/mob/dead/observer/handle_track(var/message, var/verb = "says", var/datum/language/language, var/mob/speaker = null, var/speaker_name, var/atom/follow_target, var/hard_to_hear)
return "[speaker_name] ([ghost_follow_link(follow_target, ghost=src)])"
/mob/dead/observer/handle_speaker_name(var/mob/speaker = null, var/vname, var/hard_to_hear)
var/speaker_name = ..()
if(speaker && (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.
speaker_name = "[speaker.real_name] ([speaker_name])"
return speaker_name