diff --git a/code/__HELPERS/game.dm b/code/__HELPERS/game.dm index b9f180ac4a..745b12e84f 100644 --- a/code/__HELPERS/game.dm +++ b/code/__HELPERS/game.dm @@ -270,6 +270,20 @@ SEND_SIGNAL(A, COMSIG_ATOM_HEARER_IN_VIEW, processing, .) processing += A.contents +/proc/get_hearers_in_range(R, atom/source) + var/turf/T = get_turf(source) + . = list() + if(!T) + return + var/list/processing = range(R, source) + var/i = 0 + while(i < length(processing)) + var/atom/A = processing[++i] + if(A.flags_1 & HEAR_1) + . += A + SEND_SIGNAL(A, COMSIG_ATOM_HEARER_IN_VIEW, processing, .) + processing += A.contents + //viewers() but with a signal, for blacklisting. /proc/fov_viewers(depth = world.view, atom/center) if(!center) diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index cad1bdf1d6..2f90f04cef 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -311,7 +311,8 @@ GLOBAL_LIST_INIT(department_radio_keys, list( /atom/movable/proc/process_yelling(list/already_heard, rendered, atom/movable/speaker, datum/language/message_language, message, list/spans, message_mode, obj/source) var/list/overhearing = list() -#warn todo: yelling + overhearing = yelling_wavefill(src, 35) + overhearing = get_hearers_in_view(35, src) | get_hearers_in_range(5, src) overhearing -= already_heard for(var/_AM in overhearing) var/atom/movable/AM = _AM