Skip to content

Commit

Permalink
TGS Test Merge (#6686)
Browse files Browse the repository at this point in the history
  • Loading branch information
lordme authored and lordme committed Aug 29, 2024
2 parents 151a060 + 3a36cbf commit 890d3c3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
14 changes: 13 additions & 1 deletion code/game/objects/items/devices/text_to_speech.dm
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,20 @@
if(activated)
var/message = message_args["message"]
var/whispering = message_args["whispering"]
var/message_mode = message_args["message_mode"]
var/speech_verb = whispering ? "quietly states" : "states"
message_args["cancelled"] = TRUE
audible_message("[icon2html(thing = src, target = world)] \The [name] [whispering ? "quietly states" : "states"], \"[message]\"", null, whispering ? 2 : world.view)
audible_message("[icon2html(thing = src, target = world)] \The [name] [speech_verb], \"[message]\"", null, whispering ? 2 : world.view)
if(!whispering)
linked_user.say_overhead(message, FALSE, MESSAGE_RANGE_COMBAT_LOUD)

if(ishuman(source) && message_mode == "headset")
var/mob/living/carbon/human/H = source
var/obj/item/radio/headset/left_radio = H.l_ear
var/obj/item/radio/headset/right_radio = H.r_ear
if(istype(left_radio))
left_radio.talk_into(source, message, null, speech_verb, null)
if(istype(right_radio))
right_radio.talk_into(source, message, null, speech_verb, null)

playsound(src, 'sound/items/tts/stopped_type.ogg', 25, TRUE)
2 changes: 1 addition & 1 deletion code/modules/mob/living/say.dm
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ var/list/channel_to_radio_key = new
verb = speaking.speech_verb
w_not_heard = "[speaking.speech_verb] something [w_adverb]"

var/list/message_args = list("message" = message, "whispering" = whispering, "cancelled" = FALSE)
var/list/message_args = list("message" = message, "whispering" = whispering, "cancelled" = FALSE, "message_mode" = message_mode)

SEND_SIGNAL(src, COMSIG_MOB_SAY, message_args)

Expand Down

0 comments on commit 890d3c3

Please sign in to comment.