diff --git a/code/modules/emotes/emote_mob.dm b/code/modules/emotes/emote_mob.dm index 013e978fef1..9682e12361a 100644 --- a/code/modules/emotes/emote_mob.dm +++ b/code/modules/emotes/emote_mob.dm @@ -129,7 +129,7 @@ nametext = "[emoter]" return pretext + nametext + subtext -/mob/proc/custom_emote(var/m_type = VISIBLE_MESSAGE, var/message = null) +/mob/proc/custom_emote(var/m_type = VISIBLE_MESSAGE, var/message = null, var/do_show_observers = TRUE) if((usr && stat) || (!use_me && usr == src)) to_chat(src, "You are unable to emote.") @@ -149,9 +149,9 @@ if (message) log_emote("[name]/[key] : [message]") if(m_type == VISIBLE_MESSAGE) - visible_message(message) + visible_message(message, show_observers = do_show_observers) else - audible_message(message) + audible_message(message, ghost_hearing = do_show_observers) // Specific mob type exceptions below. /mob/living/silicon/ai/emote(var/act, var/type, var/message) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index ef8cae1099c..ac9f4d2a5bb 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -155,7 +155,7 @@ proc/get_radio_key_from_channel(var/channel) return "asks" return verb -/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="") +/mob/living/say(var/message, var/datum/language/speaking = null, var/verb="says", var/alt_name="", var/ghost_hearing = GHOSTS_ALL_HEAR) if(stat) if(stat == DEAD) return say_dead(message) @@ -271,7 +271,7 @@ proc/get_radio_key_from_channel(var/channel) italics = 1 sound_vol *= 0.5 //muffle the sound a bit, so it's like we're actually talking through contact - get_mobs_and_objs_in_view_fast(T, message_range, listening, listening_obj) + get_mobs_and_objs_in_view_fast(T, message_range, listening, listening_obj, ghost_hearing) var/list/hear_clients = list() diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index c72ccea4622..d0b6120604b 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -364,11 +364,13 @@ /mob/living/simple_animal/proc/speak_audio() return -/mob/living/simple_animal/proc/visible_emote(var/act_desc, var/log_emote=1) - custom_emote(VISIBLE_MESSAGE, act_desc, log_emote) +/mob/living/simple_animal/proc/visible_emote(var/act_desc) + var/can_ghosts_hear = client ? GHOSTS_ALL_HEAR : ONLY_GHOSTS_IN_VIEW + custom_emote(VISIBLE_MESSAGE, act_desc, can_ghosts_hear) /mob/living/simple_animal/proc/audible_emote(var/act_desc) - custom_emote(AUDIBLE_MESSAGE, act_desc) + var/can_ghosts_hear = client ? GHOSTS_ALL_HEAR : ONLY_GHOSTS_IN_VIEW + custom_emote(AUDIBLE_MESSAGE, act_desc, can_ghosts_hear) /* mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) @@ -603,7 +605,8 @@ mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) sound_chance = prob(50) make_noise(sound_chance) - ..(message, null, verb) + var/can_ghosts_hear = client ? GHOSTS_ALL_HEAR : ONLY_GHOSTS_IN_VIEW + ..(message, null, verb, ghost_hearing = can_ghosts_hear) /mob/living/simple_animal/do_animate_chat(var/message, var/datum/language/language, var/small, var/list/show_to, var/duration, var/list/message_override) INVOKE_ASYNC(src, /atom/movable/proc/animate_chat, pick(speak), language, small, show_to, duration) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 63ccbc988e3..a6324af93a3 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -110,7 +110,7 @@ // self_message (optional) is what the src mob sees e.g. "You do something!" // blind_message (optional) is what blind people will hear e.g. "You hear something!" -/mob/visible_message(var/message, var/self_message, var/blind_message, var/range = world.view) +/mob/visible_message(var/message, var/self_message, var/blind_message, var/range = world.view, var/show_observers = TRUE) var/list/messageturfs = list() //List of turfs we broadcast to. var/list/messagemobs = list() //List of living mobs nearby who can hear it, and distant ghosts who've chosen to hear it for (var/turf in view(range, get_turf(src))) @@ -124,7 +124,7 @@ continue if (!M.client || istype(M, /mob/abstract/new_player)) continue - if((get_turf(M) in messageturfs) || (isobserver(M) && (M.client.prefs.toggles & CHAT_GHOSTSIGHT))) + if((get_turf(M) in messageturfs) || (show_observers && isobserver(M) && (M.client.prefs.toggles & CHAT_GHOSTSIGHT))) messagemobs += M for(var/A in messagemobs) @@ -175,7 +175,7 @@ // self_message (optional) is what the src mob hears. // deaf_message (optional) is what deaf people will see. // hearing_distance (optional) is the range, how many tiles away the message can be heard. -/mob/audible_message(var/message, var/deaf_message, var/hearing_distance, var/self_message) +/mob/audible_message(var/message, var/deaf_message, var/hearing_distance, var/self_message, var/ghost_hearing = GHOSTS_ALL_HEAR) var/range = world.view if(hearing_distance) @@ -185,7 +185,7 @@ var/list/mobs = list() var/list/objs = list() - get_mobs_and_objs_in_view_fast(T, range, mobs, objs) + get_mobs_and_objs_in_view_fast(T, range, mobs, objs, ghost_hearing) for(var/m in mobs) diff --git a/html/changelogs/geeves-the_giant_spider_chitters.yml b/html/changelogs/geeves-the_giant_spider_chitters.yml new file mode 100644 index 00000000000..056e8efdea3 --- /dev/null +++ b/html/changelogs/geeves-the_giant_spider_chitters.yml @@ -0,0 +1,6 @@ +author: Geeves + +delete-after: True + +changes: + - tweak: "You will now only hear simple mobs emote and speak using ghost ears if they have a client, or if they're in your view." \ No newline at end of file