mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 20:48:56 +01:00
[MIRROR] Fixes mecha speech indicators never going away [MDB IGNORE] (#19520)
* Fixes mecha speech indicators never going away (#73617) ## About The Pull Request Mecha speech indicators mistakenly passed ALL hearers in view to `flick_overlay_global`, rather than just mobs with clients, so it runtimed when it meant to disappear. I also added some client sanity to the associated procs... I'm not sure if they're needed but it seems like they'd be valuable there? ## Changelog 🆑 Melbert fix: Mecha speech indicators actually go away /🆑 * Fixes mecha speech indicators never going away --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
@@ -127,7 +127,7 @@
|
||||
|
||||
/// Like add_image_to_client, but will add the image from a list of clients
|
||||
/proc/add_image_to_clients(image/image_to_remove, list/show_to)
|
||||
for(var/client/add_to as anything in show_to)
|
||||
for(var/client/add_to in show_to)
|
||||
add_to.images += image_to_remove
|
||||
|
||||
/// Removes an image from a client's `.images`. Useful as a callback.
|
||||
@@ -136,7 +136,7 @@
|
||||
|
||||
/// Like remove_image_from_client, but will remove the image from a list of clients
|
||||
/proc/remove_image_from_clients(image/image_to_remove, list/hide_from)
|
||||
for(var/client/remove_from as anything in hide_from)
|
||||
for(var/client/remove_from in hide_from)
|
||||
remove_from.images -= image_to_remove
|
||||
|
||||
|
||||
|
||||
@@ -676,11 +676,13 @@
|
||||
///Displays a special speech bubble when someone inside the mecha speaks
|
||||
/obj/vehicle/sealed/mecha/proc/display_speech_bubble(datum/source, list/speech_args)
|
||||
SIGNAL_HANDLER
|
||||
var/list/speech_bubble_recipients = get_hearers_in_view(7,src)
|
||||
for(var/mob/M in speech_bubble_recipients)
|
||||
if(M.client)
|
||||
speech_bubble_recipients.Add(M.client)
|
||||
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(flick_overlay_global), image('icons/mob/effects/talk.dmi', src, "machine[say_test(speech_args[SPEECH_MESSAGE])]",MOB_LAYER+1), speech_bubble_recipients, 30)
|
||||
var/list/speech_bubble_recipients = list()
|
||||
for(var/mob/listener in get_hearers_in_view(7, src))
|
||||
if(listener.client)
|
||||
speech_bubble_recipients += listener.client
|
||||
|
||||
var/image/mech_speech = image('icons/mob/effects/talk.dmi', src, "machine[say_test(speech_args[SPEECH_MESSAGE])]",MOB_LAYER+1)
|
||||
INVOKE_ASYNC(GLOBAL_PROC, GLOBAL_PROC_REF(flick_overlay_global), mech_speech, speech_bubble_recipients, 3 SECONDS)
|
||||
|
||||
|
||||
/////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user