Files
GS13NG/code/modules/mob/living/silicon/say.dm
T
Poojawa 7e9b96a00f April sync (#360)
* Maps and things no code/icons

* helpers defines globalvars

* Onclick world.dm orphaned_procs

* subsystems

Round vote and shuttle autocall done here too

* datums

* Game folder

* Admin - chatter modules

* clothing - mining

* modular computers - zambies

* client

* mob level 1

* mob stage 2 + simple_animal

* silicons n brains

* mob stage 3 + Alien/Monkey

* human mobs

* icons updated

* some sounds

* emitter y u no commit

* update tgstation.dme

* compile fixes

* travis fixes

Also removes Fast digest mode, because reasons.

* tweaks for travis Mentors are broke again

Also fixes Sizeray guns

* oxygen loss fix for vore code.

* removes unused code

* some code updates

* bulk fixes

* further fixes

* outside things

* whoops.

* Maint bar ported

* GLOBs.
2017-04-13 23:37:00 -05:00

70 lines
1.9 KiB
Plaintext

/mob/living/silicon/get_spans()
return ..() | SPAN_ROBOT
/mob/living/proc/robot_talk(message)
log_say("[key_name(src)] : [message]")
var/desig = "Default Cyborg" //ezmode for taters
if(issilicon(src))
var/mob/living/silicon/S = src
desig = trim_left(S.designation + " " + S.job)
var/message_a = say_quote(message, get_spans())
var/rendered = "<i><span class='game say'>Robotic Talk, <span class='name'>[name]</span> <span class='message'>[message_a]</span></span></i>"
for(var/mob/M in GLOB.player_list)
if(M.binarycheck())
if(isAI(M))
var/renderedAI = "<i><span class='game say'>Robotic Talk, <a href='?src=\ref[M];track=[html_encode(name)]'><span class='name'>[name] ([desig])</span></a> <span class='message'>[message_a]</span></span></i>"
to_chat(M, renderedAI)
else
to_chat(M, rendered)
if(isobserver(M))
var/following = src
// If the AI talks on binary chat, we still want to follow
// it's camera eye, like if it talked on the radio
if(isAI(src))
var/mob/living/silicon/ai/ai = src
following = ai.eyeobj
var/link = FOLLOW_LINK(M, following)
to_chat(M, "[link] [rendered]")
/mob/living/silicon/binarycheck()
return 1
/mob/living/silicon/lingcheck()
return 0 //Borged or AI'd lings can't speak on the ling channel.
/mob/living/silicon/radio(message, message_mode, list/spans, language)
. = ..()
if(. != 0)
return .
if(message_mode == "robot")
if (radio)
radio.talk_into(src, message, , spans, language)
return REDUCE_RANGE
else if(message_mode in GLOB.radiochannels)
if(radio)
radio.talk_into(src, message, message_mode, spans, language)
return ITALICS | REDUCE_RANGE
return 0
/mob/living/silicon/get_message_mode(message)
. = ..()
if(..() == MODE_HEADSET)
return MODE_ROBOT
else
return .
/mob/living/silicon/handle_inherent_channels(message, message_mode)
. = ..()
if(.)
return .
if(message_mode == MODE_BINARY)
if(binarycheck())
robot_talk(message)
return 1
return 0