mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-16 01:25:10 +01:00
Fixes speech bubble appearing on blank messages
This commit is contained in:
@@ -92,7 +92,7 @@
|
||||
var/list/combined = combine_message(message_pieces, verb, speaker)
|
||||
var/message = combined["formatted"]
|
||||
if(message == "")
|
||||
return
|
||||
return FALSE
|
||||
|
||||
if(sleeping || stat == UNCONSCIOUS)
|
||||
hear_sleep(multilingual_to_message(message_pieces))
|
||||
@@ -129,9 +129,11 @@
|
||||
var/turf/source = speaker ? get_turf(speaker) : get_turf(src)
|
||||
playsound_local(source, speech_sound, sound_vol, 1)
|
||||
|
||||
return TRUE
|
||||
|
||||
// Done here instead of on_hear_say() since that is NOT called if the mob is clientless (which includes most AI mobs).
|
||||
/mob/living/hear_say(var/list/message_pieces, var/verb = "says", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
|
||||
..()
|
||||
.=..()
|
||||
if(has_AI()) // Won't happen if no ai_holder exists or there's a player inside w/o autopilot active.
|
||||
ai_holder.on_hear_say(speaker, multilingual_to_message(message_pieces))
|
||||
|
||||
|
||||
@@ -361,18 +361,18 @@ var/list/channel_to_radio_key = new
|
||||
var/runechat_enabled = M.client?.is_preference_enabled(/datum/client_preference/runechat_mob)
|
||||
|
||||
if(dst <= message_range || (M.stat == DEAD && !forbid_seeing_deadchat)) //Inside normal message range, or dead with ears (handled in the view proc)
|
||||
if(M.client && !runechat_enabled)
|
||||
var/image/I1 = listening[M] || speech_bubble
|
||||
images_to_clients[I1] |= M.client
|
||||
M << I1
|
||||
M.hear_say(message_pieces, verb, italics, src, speech_sound, sound_vol)
|
||||
if(M.hear_say(message_pieces, verb, italics, src, speech_sound, sound_vol))
|
||||
if(M.client && !runechat_enabled)
|
||||
var/image/I1 = listening[M] || speech_bubble
|
||||
images_to_clients[I1] |= M.client
|
||||
M << I1
|
||||
if(whispering && !isobserver(M)) //Don't even bother with these unless whispering
|
||||
if(dst > message_range && dst <= w_scramble_range) //Inside whisper scramble range
|
||||
if(M.client && !runechat_enabled)
|
||||
var/image/I2 = listening[M] || speech_bubble
|
||||
images_to_clients[I2] |= M.client
|
||||
M << I2
|
||||
M.hear_say(stars_all(message_pieces), verb, italics, src, speech_sound, sound_vol*0.2)
|
||||
if(M.hear_say(stars_all(message_pieces), verb, italics, src, speech_sound, sound_vol*0.2))
|
||||
if(M.client && !runechat_enabled)
|
||||
var/image/I2 = listening[M] || speech_bubble
|
||||
images_to_clients[I2] |= M.client
|
||||
M << I2
|
||||
if(dst > w_scramble_range && dst <= world.view) //Inside whisper 'visible' range
|
||||
M.show_message("<span class='game say'><span class='name'>[name]</span> [w_not_heard].</span>", 2)
|
||||
|
||||
|
||||
@@ -326,7 +326,7 @@
|
||||
/mob/living/carbon/brain/caught_soul/hear_say()
|
||||
if(ext_deaf || !client)
|
||||
return FALSE
|
||||
..()
|
||||
.=..()
|
||||
|
||||
/mob/living/carbon/brain/caught_soul/show_message(msg, type, alt, alt_type)
|
||||
if(ext_blind || !client)
|
||||
|
||||
Reference in New Issue
Block a user