mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-09 07:57:50 +00:00
More work on Saycode, add graphical documentation.
This commit is contained in:
@@ -83,4 +83,7 @@
|
||||
name = signal.data["name"]
|
||||
job = signal.data["job"]
|
||||
lquote = signal.data["left_quote"]
|
||||
rquote = signal.data["right_quote"]
|
||||
rquote = signal.data["right_quote"]
|
||||
|
||||
/datum/speech/proc/set_language(var/lang_id)
|
||||
language = all_languages[lang_id]
|
||||
@@ -615,10 +615,10 @@
|
||||
dat += text("<font color='red'>Retinal misalignment detected.</font><BR>")
|
||||
return dat
|
||||
|
||||
/obj/machinery/body_scanconsole/Hear(message, atom/movable/speaker, message_langs, raw_message, radio_freq)
|
||||
/obj/machinery/body_scanconsole/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(!src.connected || src.connected.scanning<3)
|
||||
return
|
||||
if(speaker in range(src,3) && findtext(raw_message, "scanner, print"))
|
||||
if(speech.speaker && speech.speaker in range(src,3) && findtext(speech.message, "scanner, print"))
|
||||
if(!src.connected.occupant||!istype(src.connected.occupant,/mob/living/carbon/human))
|
||||
return
|
||||
var/obj/item/weapon/paper/R = new(src.loc)
|
||||
|
||||
@@ -44,11 +44,9 @@ Here it is: Buttbot.
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/bot/buttbot/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
if(prob(buttchance) && !findtext(message,"butt"))
|
||||
message = strip_html_properly(html_decode(raw_message))
|
||||
|
||||
var/list/split_phrase = text2list(message," ") //Split it up into words.
|
||||
/obj/machinery/bot/buttbot/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(prob(buttchance) && !findtext(speech.message,"butt"))
|
||||
var/list/split_phrase = text2list(speech.message," ") // Split it up into words.
|
||||
|
||||
var/list/prepared_words = split_phrase.Copy()
|
||||
var/i = rand(1,3)
|
||||
@@ -62,7 +60,7 @@ Here it is: Buttbot.
|
||||
|
||||
split_phrase[index] = "butt"
|
||||
|
||||
say(sanitize(list2text(split_phrase," ")), speaking)
|
||||
say(list2text(split_phrase," "), speech.language) // No longer need to sanitize, speech is automatically html_encoded at render-time.
|
||||
return
|
||||
|
||||
|
||||
|
||||
@@ -411,16 +411,16 @@ var/list/camera_names=list()
|
||||
return "<span class='game say'><span class='name'>[namepart]</span>[messagepart]</span>"
|
||||
*/
|
||||
|
||||
/obj/machinery/camera/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
/obj/machinery/camera/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(isHearing())
|
||||
for(var/obj/machinery/computer/security/S in tv_monitors)
|
||||
if(S.current == src)
|
||||
if(istype(S, /obj/machinery/computer/security/telescreen))
|
||||
for(var/mob/M in viewers(world.view,S))
|
||||
M << "<span style='color:grey'>\icon[S][tv_message(M, speaker,speaking,raw_message)]</span>"
|
||||
M << "<span style='color:grey'>\icon[S][tv_message(M, speech, rendered_speech)]</span>"
|
||||
else
|
||||
for(var/mob/M in viewers(1,S))
|
||||
M << "<span style='color:grey'>\icon[S][tv_message(M, speaker,speaking,raw_message)]</span>"
|
||||
M << "<span style='color:grey'>\icon[S][tv_message(M, speech, rendered_speech)]</span>"
|
||||
|
||||
/obj/machinery/camera/arena
|
||||
name = "arena camera"
|
||||
|
||||
@@ -218,7 +218,7 @@
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/mecha/proc/drop_item() called tick#: [world.time]")
|
||||
return
|
||||
|
||||
/obj/mecha/Hear(var/datum/speech/speech, var/message)
|
||||
/obj/mecha/Hear(var/datum/speech/speech, var/rendered_message="")
|
||||
if(speech.speaker == occupant && radio.broadcasting)
|
||||
radio.talk_into(speech)
|
||||
return
|
||||
|
||||
@@ -221,7 +221,7 @@
|
||||
/obj/item/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
return
|
||||
|
||||
/obj/item/proc/talk_into(mob/M as mob, var/text, var/channel=null)
|
||||
/obj/item/proc/talk_into(var/datum/speech/speech, var/channel=null)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/obj/item/proc/talk_into() called tick#: [world.time]")
|
||||
return
|
||||
|
||||
|
||||
@@ -63,8 +63,8 @@
|
||||
return canhear_range
|
||||
|
||||
|
||||
/obj/item/device/radio/intercom/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
if(!src.anyai && !(speaker in src.ai))
|
||||
/obj/item/device/radio/intercom/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(speech.speaker && !src.anyai && !(speech.speaker in src.ai))
|
||||
return
|
||||
..()
|
||||
|
||||
|
||||
@@ -224,7 +224,7 @@
|
||||
return
|
||||
|
||||
*/
|
||||
/obj/item/device/radio/talk_into(var/datum/speech/speech)
|
||||
/obj/item/device/radio/talk_into(var/datum/speech/speech, var/channel=null)
|
||||
if(!on) return // the device has to be on
|
||||
// Fix for permacell radios, but kinda eh about actually fixing them.
|
||||
if(!speech.speaker || !speech.message) return
|
||||
@@ -251,22 +251,15 @@
|
||||
be prepared to disregard any comments in all of tcomms code. i tried my best to keep them somewhat up-to-date, but eh
|
||||
*/
|
||||
|
||||
// WHY THE FUCK WAS THIS GRABBING THE FUCKING FREQUENCY WHEN WE ALREADY KNOW IT
|
||||
/*
|
||||
var/freq
|
||||
if(channel && channels && channels.len > 0)
|
||||
if(channel == "department")
|
||||
channel = channels[1]
|
||||
freq = secure_radio_connections[channel]
|
||||
speech.frequency = secure_radio_connections[channel]
|
||||
if(!channels[channel])
|
||||
return
|
||||
else
|
||||
freq = frequency
|
||||
speech.frequency = frequency
|
||||
channel = null
|
||||
*/
|
||||
|
||||
// Override speech frequency.
|
||||
speech.frequency=frequency
|
||||
|
||||
var/turf/position = get_turf(src)
|
||||
|
||||
@@ -424,12 +417,12 @@
|
||||
// Send a mundane broadcast with limited targets:
|
||||
Broadcast_Message(speech, voicemask, filter_type, signal.data["compression"], list(position.z))
|
||||
|
||||
/obj/item/device/radio/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
if(radio_freq)
|
||||
/obj/item/device/radio/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(!speech.speaker || speech.frequency)
|
||||
return
|
||||
if (broadcasting)
|
||||
if(get_dist(src, speaker) <= canhear_range)
|
||||
talk_into(speaker, raw_message, null, speaking)
|
||||
if(get_dist(src, speech.speaker) <= canhear_range)
|
||||
talk_into(speech)
|
||||
/*
|
||||
/obj/item/device/radio/proc/accept_rad(obj/item/device/radio/R as obj, message)
|
||||
|
||||
|
||||
@@ -21,10 +21,10 @@
|
||||
throw_speed = 4
|
||||
throw_range = 20
|
||||
|
||||
/obj/item/device/taperecorder/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
/obj/item/device/taperecorder/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(recording)
|
||||
timestamp += timerecorded
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] [strip_html_properly(html_decode(raw_message))]"
|
||||
storedinfo += "\[[time2text(timerecorded*10,"mm:ss")]\] \"[html_encode(speech.message)]\""
|
||||
|
||||
/obj/item/device/taperecorder/attackby(obj/item/weapon/W as obj, mob/user as mob)
|
||||
..()
|
||||
|
||||
@@ -154,8 +154,8 @@ Implant Specifics:<BR>"}
|
||||
<b>Integrity:</b> Implant will occasionally be degraded by the body's immune system and thus will occasionally malfunction."}
|
||||
return dat
|
||||
|
||||
/obj/item/weapon/implant/explosive/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
hear(message)
|
||||
/obj/item/weapon/implant/explosive/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
hear(speech.message)
|
||||
return
|
||||
|
||||
/obj/item/weapon/implant/explosive/hear(var/msg)
|
||||
@@ -450,6 +450,10 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
var/mob/M = imp_in
|
||||
var/area/t = get_area(M)
|
||||
src.name = "\improper [mobname]'s Death Alarm"
|
||||
var/datum/speech/speech = create_speech("[mobname] has died in",1459,src)
|
||||
speech.name="[mobname]'s Death Alarm"
|
||||
speech.job="Death Alarm"
|
||||
speech.set_language(LANGUAGE_SOL_COMMON)
|
||||
switch (cause)
|
||||
if("death")
|
||||
if(!announcement_intercom || !istype(announcement_intercom))
|
||||
@@ -457,16 +461,17 @@ the implant may become unstable and either pre-maturely inject the subject or si
|
||||
|
||||
if(istype(t, /area/syndicate_station) || istype(t, /area/syndicate_mothership) || istype(t, /area/shuttle/syndicate_elite) )
|
||||
//give the syndies a bit of stealth
|
||||
Broadcast_Message(announcement_intercom, all_languages["Sol Common"], null, announcement_intercom, "[mobname] has died in Space!", "[mobname]'s Death Alarm", "Death Alarm", "[mobname]'s Death Alarm", 0, 0, list(0,1), 1459)
|
||||
speech.message="[mobname] has died in Space!"
|
||||
else
|
||||
Broadcast_Message(announcement_intercom, all_languages["Sol Common"], null, announcement_intercom, "[mobname] has died in [t.name]!", "[mobname]'s Death Alarm", "Death Alarm", "[mobname]'s Death Alarm", 0, 0, list(0,1), 1459)
|
||||
speech.message="[mobname] has died in [t.name]!"
|
||||
processing_objects.Remove(src)
|
||||
if ("emp")
|
||||
var/name = prob(50) ? t.name : pick(teleportlocs)
|
||||
Broadcast_Message(announcement_intercom, all_languages["Sol Common"], null, announcement_intercom, "[mobname] has died in [name]!", "[mobname]'s Death Alarm", "Death Alarm", "[mobname]'s Death Alarm", 0, 0, list(0,1), 1459)
|
||||
speech.message="[mobname] has died in [name]!"
|
||||
else
|
||||
Broadcast_Message(announcement_intercom, all_languages["Sol Common"], null, announcement_intercom, "[mobname] has died-zzzzt in-in-in...", "[mobname]'s Death Alarm", "Death Alarm", "[mobname]'s Death Alarm", 0, 0, list(0,1), 1459)
|
||||
speech.message="[mobname] has died-zzzzt in-in-in..."
|
||||
processing_objects.Remove(src)
|
||||
Broadcast_Message(speech, vmask=0, data=0, compression=0, level=list(0,1))
|
||||
|
||||
/obj/item/weapon/implant/death_alarm/emp_act(severity) //for some reason alarms stop going off in case they are emp'd, even without this
|
||||
if (malfunction) //so I'm just going to add a meltdown chance here
|
||||
|
||||
@@ -9,16 +9,16 @@
|
||||
var/listening = 0
|
||||
var/recorded = "" //the activation message
|
||||
|
||||
/obj/item/device/assembly/voice/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
if(speaker == src)
|
||||
/obj/item/device/assembly/voice/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(!speech.speaker || speech.speaker == src)
|
||||
return
|
||||
if(listening && !radio_freq)
|
||||
recorded = raw_message
|
||||
if(listening && !speech.frequency)
|
||||
recorded = speech.message
|
||||
listening = 0
|
||||
say("Activation message is '[recorded]'.")
|
||||
say("Activation message is '[html_encode(speech.message)]'.")
|
||||
else
|
||||
if(findtext(message, recorded))
|
||||
if(istype(speaker, /obj/item/device/assembly))
|
||||
if(findtext(speech.message, recorded))
|
||||
if(istype(speech.speaker, /obj/item/device/assembly))
|
||||
playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 25, 1)
|
||||
else
|
||||
pulse(0)
|
||||
@@ -34,6 +34,7 @@
|
||||
activate()
|
||||
return 1
|
||||
|
||||
// why is this here.
|
||||
/obj/machinery/vending/say_quote(text)
|
||||
return "beeps, \"[text]\""
|
||||
|
||||
|
||||
@@ -27,24 +27,24 @@
|
||||
|
||||
return "[pick("whines", "cries", "spooks", "complains", "drones", "mutters")], \"[text]\"";
|
||||
|
||||
/mob/dead/observer/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
if (isnull(client))
|
||||
/mob/dead/observer/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if (isnull(client) || !speech.speaker)
|
||||
return
|
||||
|
||||
var/source = speaker.GetSource()
|
||||
var/source = speech.speaker.GetSource()
|
||||
|
||||
var/source_turf = get_turf(source)
|
||||
|
||||
if (get_dist(source_turf, src) <= world.view) // If this isn't true, we can't be in view, so no need for costlier proc.
|
||||
if (source_turf in view(src))
|
||||
message = "<B>[message]</B>"
|
||||
rendered_speech = "<B>[rendered_speech]</B>"
|
||||
else
|
||||
if(client && client.prefs)
|
||||
if (isnull(radio_freq))
|
||||
if (isnull(speech.frequency))
|
||||
if (!(client.prefs.toggles & CHAT_GHOSTEARS))
|
||||
return
|
||||
else
|
||||
if (!(client.prefs.toggles & CHAT_GHOSTRADIO))
|
||||
return
|
||||
|
||||
src << "<a href='?src=\ref[src];follow=\ref[source]'>(Follow)</a> [message]"
|
||||
src << "<a href='?src=\ref[src];follow=\ref[source]'>(Follow)</a> [rendered_speech]"
|
||||
|
||||
@@ -32,7 +32,7 @@ var/global/list/mob/virtualhearer/virtualhearers = list()
|
||||
/mob/virtualhearer/resetVariables()
|
||||
return
|
||||
|
||||
/mob/virtualhearer/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
/mob/virtualhearer/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(attached)
|
||||
attached.Hear(args)
|
||||
else
|
||||
|
||||
@@ -20,11 +20,11 @@
|
||||
if((!S.stat && S.hivecheck()) || ((S in dead_mob_list) && !istype(S, /mob/new_player)))
|
||||
handle_render(S,rendered,src)
|
||||
|
||||
/mob/living/carbon/alien/handle_inherent_channels(message, message_mode, var/datum/language/speaking)
|
||||
/mob/living/carbon/alien/handle_inherent_channels(var/datum/speech/speech, var/message_mode)
|
||||
if(!..())
|
||||
if(message_mode == MODE_ALIEN)
|
||||
if(hivecheck())
|
||||
alien_talk(message)
|
||||
alien_talk(speech.message)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
if(message_mode && istype(container, /obj/item/device/mmi/radio_enabled))
|
||||
var/obj/item/device/mmi/radio_enabled/R = container
|
||||
if(R.radio)
|
||||
R.radio.talk_into(speech)
|
||||
R.radio.talk_into(speech) // Might need message_mode
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
/mob/living/carbon/brain/lingcheck()
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
speaking = null
|
||||
speaking = get_default_language()
|
||||
|
||||
message = trim(strip_html_properly(message))
|
||||
message = trim(message)
|
||||
if(!can_speak(message))
|
||||
return
|
||||
|
||||
@@ -43,13 +43,16 @@
|
||||
if(stat == UNCONSCIOUS && (!critical || said_last_words))
|
||||
return
|
||||
|
||||
var/datum/speech/speech = create_speech(message)
|
||||
speech.set_language(speaking)
|
||||
|
||||
log_whisper("[key_name(src)] ([formatLocation(src)]): [message]")
|
||||
|
||||
// If whispering your last words, limit the whisper based on how close you are to death.
|
||||
if(critical && !said_last_words)
|
||||
var/health_diff = round(-config.health_threshold_dead + health)
|
||||
// If we cut our message short, abruptly end it with a-..
|
||||
var/message_len = length(message)
|
||||
var/message_len = length(speech.message)
|
||||
message = copytext(message, 1, health_diff) + "[message_len > health_diff ? "-.." : "..."]"
|
||||
message = Ellipsis(message, 10, 1)
|
||||
whispers = "whispers in their final breath"
|
||||
@@ -66,7 +69,7 @@
|
||||
|
||||
for (var/atom/movable/listener in listeners)
|
||||
if (listener)
|
||||
listener.Hear(rendered, src, speaking, message)
|
||||
listener.Hear(speech, rendered)
|
||||
|
||||
listeners = null
|
||||
|
||||
@@ -76,7 +79,7 @@
|
||||
|
||||
for (var/atom/movable/eavesdropper in eavesdroppers)
|
||||
if (eavesdropper)
|
||||
eavesdropper.Hear(rendered, src, speaking, message)
|
||||
eavesdropper.Hear(speech, rendered)
|
||||
|
||||
eavesdroppers = null
|
||||
|
||||
|
||||
@@ -11,13 +11,15 @@
|
||||
|
||||
return "telepathically chirps, \"[text]\"";
|
||||
|
||||
/mob/living/carbon/slime/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
if(speaker != src && !radio_freq)
|
||||
if(speaker) speaker = speaker.GetSource()
|
||||
/mob/living/carbon/slime/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(speech.speaker && speech.speaker != src && !speech.frequency)
|
||||
var/atom/movable/speaker=speech.speaker
|
||||
if(speaker)
|
||||
speaker = speaker.GetSource()
|
||||
if(speaker in Friends)
|
||||
speech_buffer = list()
|
||||
speech_buffer += speaker.name
|
||||
speech_buffer += lowertext(html_decode(message))
|
||||
speech_buffer += speech.name
|
||||
speech_buffer += lowertext(html_encode(rendered_speech))
|
||||
..()
|
||||
|
||||
/mob/living/carbon/slime/say_understands(var/other)
|
||||
|
||||
@@ -187,7 +187,7 @@ var/list/department_radio_keys = list(
|
||||
speech.language = get_default_language()
|
||||
say_testing(src, "Didnt have a language, get_default_language() gave us [speech.language ? speech.language.name : "null"]")
|
||||
speech.message = trim_left(speech.message)
|
||||
if(handle_inherent_channels(speech.message, message_mode, speech.language))
|
||||
if(handle_inherent_channels(speech, message_mode))
|
||||
say_testing(src, "Handled by inherent channel")
|
||||
return
|
||||
if(!can_speak_vocal(speech.message))
|
||||
@@ -315,14 +315,14 @@ var/list/department_radio_keys = list(
|
||||
else if(length(message) > 2)
|
||||
return department_radio_keys[copytext(message, 1, 3)]
|
||||
|
||||
/mob/living/proc/handle_inherent_channels(message, message_mode, var/datum/language/speaking)
|
||||
/mob/living/proc/handle_inherent_channels(var/datum/speech/speech, var/message_mode)
|
||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/proc/handle_inherent_channels() called tick#: [world.time]")
|
||||
switch(message_mode)
|
||||
if(MODE_CHANGELING)
|
||||
if(lingcheck())
|
||||
var/turf/T = get_turf(src)
|
||||
log_say("[mind.changeling.changelingID]/[key_name(src)] (@[T.x],[T.y],[T.z]) Changeling Hivemind: [message]")
|
||||
var/themessage = text("<i><font color=#800080><b>[]:</b> []</font></i>",mind.changeling.changelingID,message)
|
||||
log_say("[mind.changeling.changelingID]/[key_name(src)] (@[T.x],[T.y],[T.z]) Changeling Hivemind: [html_encode(speech.message)]")
|
||||
var/themessage = text("<i><font color=#800080><b>[]:</b> []</font></i>",mind.changeling.changelingID,html_encode(speech.message))
|
||||
for(var/mob/M in player_list)
|
||||
if(M.lingcheck() || ((M in dead_mob_list) && !istype(M, /mob/new_player)))
|
||||
handle_render(M,themessage,src)
|
||||
@@ -330,22 +330,23 @@ var/list/department_radio_keys = list(
|
||||
if(MODE_CULTCHAT)
|
||||
if(construct_chat_check(1)) /*sending check for humins*/
|
||||
var/turf/T = get_turf(src)
|
||||
log_say("[key_name(src)] (@[T.x],[T.y],[T.z]) Cult channel: [message]")
|
||||
var/themessage = text("<span class='sinister'><b>[]:</b> []</span>",src.name,message)
|
||||
log_say("[key_name(src)] (@[T.x],[T.y],[T.z]) Cult channel: [html_encode(speech.message)]")
|
||||
var/themessage = text("<span class='sinister'><b>[]:</b> []</span>",src.name,html_encode(speech.message))
|
||||
for(var/mob/M in player_list)
|
||||
if(M.construct_chat_check(2) /*receiving check*/ || ((M in dead_mob_list) && !istype(M, /mob/new_player)))
|
||||
handle_render(M,themessage,src)
|
||||
return 1
|
||||
if(MODE_ANCIENT)
|
||||
if(isMoMMI(src)) return 0 //Noice try, I really do appreciate the effort
|
||||
if(isMoMMI(src))
|
||||
return 0 //Noice try, I really do appreciate the effort
|
||||
var/list/stone = search_contents_for(/obj/item/commstone)
|
||||
if(stone.len)
|
||||
var/obj/item/commstone/commstone = stone[1]
|
||||
if(commstone.commdevice)
|
||||
var/list/stones = commstone.commdevice.get_active_stones()
|
||||
var/themessage = text("<span class='ancient'>Ancient communication, <b>[]:</b> []</span>",src.name,message)
|
||||
var/themessage = text("<span class='ancient'>Ancient communication, <b>[]:</b> []</span>",src.name,html_encode(speech.message))
|
||||
var/turf/T = get_turf(src)
|
||||
log_say("[key_name(src)] (@[T.x],[T.y],[T.z]) Ancient chat: [message]")
|
||||
log_say("[key_name(src)] (@[T.x],[T.y],[T.z]) Ancient chat: [html_encode(speech.message)]")
|
||||
for(var/thestone in stones)
|
||||
var/mob/M = find_holder_of_type(thestone,/mob)
|
||||
handle_render(M,themessage,src)
|
||||
|
||||
@@ -39,14 +39,14 @@
|
||||
return 0
|
||||
|
||||
//An AI eyeobj mob cant have a virtualhearer to hear with unless it gets one from a malf module
|
||||
/mob/camera/aiEye/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
if(radio_freq) //HOW CAN IT POSSIBLY READ LIPS THROUGH RADIOS
|
||||
/mob/camera/aiEye/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(speech.frequency) //HOW CAN IT POSSIBLY READ LIPS THROUGH RADIOS
|
||||
return
|
||||
|
||||
var/mob/M = speaker
|
||||
var/mob/M = speech.speaker
|
||||
if(istype(M))
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = speaker
|
||||
var/mob/living/carbon/human/H = speech.speaker
|
||||
if(H.check_body_part_coverage(MOUTH)) //OR MASKS
|
||||
return
|
||||
ai.Hear(args) //He can only read the lips of mobs, I cant think of objects using lips
|
||||
|
||||
@@ -53,13 +53,13 @@
|
||||
else
|
||||
return ..()
|
||||
|
||||
/mob/living/silicon/ai/handle_inherent_channels(message, message_mode, var/datum/language/speaking)
|
||||
/mob/living/silicon/ai/handle_inherent_channels(var/datum/speech/speech, var/message_mode)
|
||||
. = ..()
|
||||
if(.)
|
||||
return .
|
||||
|
||||
if(message_mode == MODE_HOLOPAD)
|
||||
holopad_talk(message,speaking)
|
||||
holopad_talk(speech.message, speech.language)
|
||||
return 1
|
||||
|
||||
//For holopads only. Usable by AI.
|
||||
|
||||
@@ -8,21 +8,21 @@
|
||||
|
||||
return "states, \"[text]\"";
|
||||
|
||||
/mob/living/silicon/robot/mommi/handle_inherent_channels(var/message, var/message_mode, var/datum/language/speaking)
|
||||
/mob/living/silicon/robot/mommi/handle_inherent_channels(var/datum/speech/speech, var/message_mode)
|
||||
. = ..()
|
||||
if(.)
|
||||
return .
|
||||
if(src.keeper)
|
||||
message = trim(message)
|
||||
if (!message)
|
||||
speech.message = trim(speech.message)
|
||||
if (!speech.message)
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(src)
|
||||
var/msg = !T ? "Nullspace" : "[T.x],[T.y],[T.z]"
|
||||
log_say("[key_name(src)] (@[msg]) Damage Control: [message]")
|
||||
log_say("[key_name(src)] (@[msg]) Damage Control: [html_encode(speech.message)]")
|
||||
|
||||
|
||||
var/interior_message = say_quote(message)
|
||||
var/interior_message = say_quote(html_encode(speech.message))
|
||||
var/rendered = text("<i><span class='mommi game say'>Damage Control, <span class='name'>[]</span> <span class='message'>[]</span></span></i>",name,interior_message)
|
||||
|
||||
for (var/mob/S in player_list)
|
||||
|
||||
@@ -37,18 +37,18 @@
|
||||
/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, raw_message, var/datum/language/speaking)
|
||||
/mob/living/silicon/radio(var/datum/speech/speech, var/message_mode)
|
||||
. = ..()
|
||||
if(. != 0)
|
||||
return .
|
||||
if(message_mode == "robot")
|
||||
if(radio)
|
||||
radio.talk_into(src, message, null, speaking)
|
||||
radio.talk_into(speech)
|
||||
return REDUCE_RANGE
|
||||
|
||||
else if(message_mode in radiochannels)
|
||||
if(radio)
|
||||
radio.talk_into(src, message, message_mode, speaking)
|
||||
radio.talk_into(speech, message_mode)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
return 0
|
||||
|
||||
@@ -59,14 +59,14 @@
|
||||
else
|
||||
return .
|
||||
|
||||
/mob/living/silicon/handle_inherent_channels(message, message_mode, var/datum/language/speaking)
|
||||
/mob/living/silicon/handle_inherent_channels(var/datum/speech/speech, var/message_mode)
|
||||
. = ..()
|
||||
if(.)
|
||||
return .
|
||||
|
||||
if(message_mode == MODE_BINARY)
|
||||
if(binarycheck())
|
||||
robot_talk(message)
|
||||
robot_talk(speech.message)
|
||||
return 1
|
||||
return 0
|
||||
|
||||
|
||||
@@ -39,15 +39,15 @@
|
||||
if(mind in ticker.mode.cult)
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/construct/handle_inherent_channels(message, message_mode, var/datum/language/speaking)
|
||||
/mob/living/simple_animal/construct/handle_inherent_channels(var/datum/speech/speech, var/message_mode)
|
||||
if(..())
|
||||
return 1
|
||||
if(message_mode == MODE_HEADSET && construct_chat_check(0))
|
||||
var/turf/T = get_turf(src)
|
||||
log_say("[key_name(src)] (@[T.x],[T.y],[T.z]) Cult channel: [message]")
|
||||
log_say("[key_name(src)] (@[T.x],[T.y],[T.z]) Cult channel: [html_encode(speech.message)]")
|
||||
for(var/mob/M in mob_list)
|
||||
if(M.construct_chat_check(2) /*receiving check*/ || ((M in dead_mob_list) && !istype(M, /mob/new_player)))
|
||||
M << "<span class='sinister'><b>[src.name]:</b> [message]</span>"
|
||||
M << "<span class='sinister'><b>[src.name]:</b> [html_encode(speech.message)]</span>"
|
||||
return 1
|
||||
|
||||
/mob/living/simple_animal/construct/cultify()
|
||||
|
||||
@@ -127,14 +127,14 @@
|
||||
stat("Mode",a_intent)
|
||||
|
||||
|
||||
/mob/living/simple_animal/parrot/Hear(message, atom/movable/speaker, var/datum/language/speaking, raw_message, radio_freq)
|
||||
if(speaker != src && prob(20)) //Don't imitate outselves
|
||||
/mob/living/simple_animal/parrot/Hear(var/datum/speech/speech, var/rendered_speech="")
|
||||
if(speech.speaker && speech.speaker != src && prob(20)) //Don't imitate outselves
|
||||
if(speech_buffer.len >= 20)
|
||||
speech_buffer -= pick(speech_buffer)
|
||||
speech_buffer |= strip_html_properly(html_decode(raw_message))
|
||||
speech_buffer |= speech.message
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/parrot/radio(message, message_mode, raw_message, var/datum/language/speaking) //literally copied from human/radio(), but there's no other way to do this, at least it's better than it used to be.
|
||||
/mob/living/simple_animal/parrot/radio(var/datum/speech/speech, var/message_mode)
|
||||
. = ..()
|
||||
if(. != 0)
|
||||
return .
|
||||
@@ -142,21 +142,21 @@
|
||||
switch(message_mode)
|
||||
if(MODE_HEADSET)
|
||||
if (ears)
|
||||
ears.talk_into(src, message, null, speaking)
|
||||
ears.talk_into(speech)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(MODE_SECURE_HEADSET)
|
||||
if(ears)
|
||||
ears.talk_into(src, message, 1, speaking)
|
||||
ears.talk_into(speech, 1) // No fucking clue why message_mode is 1.
|
||||
return ITALICS | REDUCE_RANGE
|
||||
if(MODE_DEPARTMENT)
|
||||
if(ears)
|
||||
ears.talk_into(src, message, message_mode, speaking)
|
||||
ears.talk_into(speech, message_mode)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
if(message_mode in radiochannels)
|
||||
if(ears)
|
||||
ears.talk_into(src, message, message_mode, speaking)
|
||||
ears.talk_into(speech, message_mode)
|
||||
return ITALICS | REDUCE_RANGE
|
||||
|
||||
return 0
|
||||
|
||||
BIN
docs/saycode.pdf
Normal file
BIN
docs/saycode.pdf
Normal file
Binary file not shown.
BIN
docs/saycode.vsd
Normal file
BIN
docs/saycode.vsd
Normal file
Binary file not shown.
Reference in New Issue
Block a user