This commit is contained in:
silicons
2021-04-26 23:10:10 -07:00
parent 8fe45263c5
commit eb2c12ceee
2 changed files with 16 additions and 1 deletions
+14
View File
@@ -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)
+2 -1
View File
@@ -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