Skip to content

Commit

Permalink
TGS Test Merge (#16662)
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyorange committed Oct 16, 2024
2 parents 9c479fb + 6d5402d commit 8ca02d1
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 15 deletions.
8 changes: 7 additions & 1 deletion code/datums/jobs/squads.dm
Original file line number Diff line number Diff line change
Expand Up @@ -347,11 +347,12 @@
text = "<font size='3'><b>[text]<b></font>"
return "[nametext][text]"


/datum/squad/proc/message_squad(message, mob/living/carbon/human/sender)
if(is_ic_filtered(message) || NON_ASCII_CHECK(message))
to_chat(sender, span_boldnotice("Message invalid. Check your message does not contain filtered words or characters."))
return
var/list/treated_message = sender?.treat_message(message)
message = treated_message["message"]

var/header = "AUTOMATED CIC NOTICE:"
var/sound = "sound/misc/notice3.ogg"
Expand All @@ -366,6 +367,11 @@
for(var/mob/living/marine AS in marines_list)
marine.playsound_local(marine, sound, 35)
marine.play_screen_text("<span class='maptext' style=font-size:24pt;text-align:center valign='top'><u>[header]</u></span><br>" + message, message_type, message_color)
if(sender?.voice && SStts.tts_enabled)
var/list/extra_filters = list(TTS_FILTER_RADIO)
if(isrobot(sender))
extra_filters += TTS_FILTER_SILICON
INVOKE_ASYNC(SStts, TYPE_PROC_REF(/datum/controller/subsystem/tts, queue_tts_message), sender, treated_message["tts_message"], sender.get_default_language(), sender.voice, sender.voice_filter, marines_list, TRUE, pitch = sender.pitch, special_filters = extra_filters.Join("|"), directionality = FALSE)

/datum/squad/proc/check_entry(datum/job/job)
if(!(job.title in current_positions))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@

/mob/living/carbon/xenomorph/hivemind/receive_hivemind_message(mob/living/carbon/xenomorph/speaker, message)
var/track = "<a href='?src=[REF(src)];hivemind_jump=[REF(speaker)]'>(F)</a>"
show_message("[track] [speaker.hivemind_start()] [span_message("hisses, '[message]'")][speaker.hivemind_end()]", 2)
return show_message("[track] [speaker.hivemind_start()] [span_message("hisses, '[message]'")][speaker.hivemind_end()]", 2)

/mob/living/carbon/xenomorph/hivemind/Topic(href, href_list)
. = ..()
Expand Down
6 changes: 0 additions & 6 deletions code/modules/mob/living/carbon/xenomorph/hive_datum.dm
Original file line number Diff line number Diff line change
Expand Up @@ -872,12 +872,6 @@ to_chat will check for valid clients itself already so no need to double check f

to_chat(X, "<span class='[span_class]'><font size=[size]> [message][report_distance ? " Distance: [get_dist(X, target)]" : ""]</font></span>")

// This is to simplify the process of talking in hivemind, this will invoke the receive proc of all xenos in this hive
/datum/hive_status/proc/hive_mind_message(mob/living/carbon/xenomorph/sender, message)
for(var/i in get_all_xenos())
var/mob/living/carbon/xenomorph/X = i
X.receive_hivemind_message(sender, message)

///Used for setting the trackers of all xenos in the hive, like when a nuke activates
/datum/hive_status/proc/set_all_xeno_trackers(atom/target)
for(var/mob/living/carbon/xenomorph/X AS in get_all_xenos())
Expand Down
19 changes: 12 additions & 7 deletions code/modules/mob/living/carbon/xenomorph/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -46,20 +46,25 @@

log_talk(message, LOG_HIVEMIND)

for(var/i in GLOB.observer_list)
var/mob/dead/observer/S = i
if(!S?.client?.prefs || !(S.client.prefs.toggles_chat & CHAT_GHOSTHIVEMIND))
for(var/mob/dead/observer/ghost AS in GLOB.observer_list)
if(!ghost?.client?.prefs || !(ghost.client.prefs.toggles_chat & CHAT_GHOSTHIVEMIND))
continue
var/track = FOLLOW_LINK(S, src)
S.show_message("[track] [hivemind_start()] [span_message("hisses, <b>'[message]'</b>")][hivemind_end()]", 2)
var/track = FOLLOW_LINK(ghost, src)
ghost.show_message("[track] [hivemind_start()] [span_message("hisses, <b>'[message]'</b>")][hivemind_end()]", 2)

hive.hive_mind_message(src, message)
var/list/listened = list()
for(var/mob/living/carbon/xenomorph/sister AS in hive.get_all_xenos())
if(sister.receive_hivemind_message(src, message))
listened += sister
if(SStts.tts_enabled && length(listened) && voice)
var/list/treated_message = treat_message(message)
INVOKE_ASYNC(SStts, TYPE_PROC_REF(/datum/controller/subsystem/tts, queue_tts_message), src, treated_message["tts_message"], get_default_language(), voice, voice_filter, listened, TRUE, pitch = pitch, directionality = FALSE)

return TRUE

/mob/living/carbon/xenomorph/proc/receive_hivemind_message(mob/living/carbon/xenomorph/X, message)
var/follow_link = X != src ? "<a href='byond://?src=[REF(src)];watch_xeno_name=[REF(X)]'>(F)</a> " : ""
show_message("[follow_link][X.hivemind_start()][span_message(" hisses, <b>'[message]'</b>")][X.hivemind_end()]", 2)
return show_message("[follow_link][X.hivemind_start()][span_message(" hisses, <b>'[message]'</b>")][X.hivemind_end()]", 2)


/mob/living/carbon/xenomorph/get_saymode(message, talk_key)
Expand Down

0 comments on commit 8ca02d1

Please sign in to comment.