yell wip
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user