Renames 'visible_atoms' and 'get_actual_viewers' procs to 'fov_view' and 'fov_viewers' (#12282)

* Renames 'visible_atoms' and 'get_actual_viewers' procs to 'fov_view' and 'fov_viewers'

* Ok, signals.
This commit is contained in:
Ghom
2020-05-18 02:04:15 +02:00
committed by GitHub
parent 335f5a37b9
commit 08280a853e
33 changed files with 49 additions and 49 deletions
+1 -1
View File
@@ -44,7 +44,7 @@
return
if(world.time > next_check && world.time > next_scare)
next_check = world.time + 50
var/list/seen_atoms = owner.visible_atoms(7)
var/list/seen_atoms = owner.fov_view(7)
if(LAZYLEN(trigger_objs))
for(var/obj/O in seen_atoms)
+5 -5
View File
@@ -86,10 +86,10 @@
RegisterSignal(M, COMSIG_MOB_CLIENT_LOGOUT, .proc/on_mob_logout)
RegisterSignal(M, COMSIG_MOB_GET_VISIBLE_MESSAGE, .proc/on_visible_message)
RegisterSignal(M, COMSIG_MOB_EXAMINATE, .proc/on_examinate)
RegisterSignal(M, COMSIG_MOB_VISIBLE_ATOMS, .proc/on_visible_atoms)
RegisterSignal(M, COMSIG_MOB_FOV_VIEW, .proc/on_fov_view)
RegisterSignal(M, COMSIG_MOB_CLIENT_CHANGE_VIEW, .proc/on_change_view)
RegisterSignal(M, COMSIG_MOB_RESET_PERSPECTIVE, .proc/on_reset_perspective)
RegisterSignal(M, COMSIG_MOB_IS_VIEWER, .proc/is_viewer)
RegisterSignal(M, COMSIG_MOB_FOV_VIEWER, .proc/is_viewer)
/datum/component/field_of_vision/UnregisterFromParent()
. = ..()
@@ -109,8 +109,8 @@
UNREGISTER_NESTED_LOCS(nested_locs, COMSIG_MOVABLE_MOVED, 1)
UnregisterSignal(M, list(COMSIG_MOB_CLIENT_LOGIN, COMSIG_MOB_CLIENT_LOGOUT,
COMSIG_MOB_GET_VISIBLE_MESSAGE, COMSIG_MOB_EXAMINATE,
COMSIG_MOB_VISIBLE_ATOMS, COMSIG_MOB_RESET_PERSPECTIVE,
COMSIG_MOB_CLIENT_CHANGE_VIEW, COMSIG_MOB_IS_VIEWER))
COMSIG_MOB_FOV_VIEW, COMSIG_MOB_RESET_PERSPECTIVE,
COMSIG_MOB_CLIENT_CHANGE_VIEW, COMSIG_MOB_FOV_VIEWER))
/**
* Generates the holder and images (if not generated yet) and adds them to client.images.
@@ -296,7 +296,7 @@
if(fov.alpha)
FOV_ANGLE_CHECK(source, target, return, return COMPONENT_NO_VISIBLE_MESSAGE)
/datum/component/field_of_vision/proc/on_visible_atoms(mob/source, list/atoms)
/datum/component/field_of_vision/proc/on_fov_view(mob/source, list/atoms)
if(!fov.alpha)
return
for(var/k in atoms)
+1 -1
View File
@@ -572,7 +572,7 @@
if(rustle_sound)
playsound(parent, "rustle", 50, 1, -5)
to_chat(user, "<span class='notice'>You put [I] [insert_preposition]to [parent].</span>")
for(var/mob/viewing in get_actual_viewers(world.view, user)-M)
for(var/mob/viewing in fov_viewers(world.view, user)-M)
if(in_range(M, viewing)) //If someone is standing close enough, they can tell what it is...
viewing.show_message("<span class='notice'>[M] puts [I] [insert_preposition]to [parent].</span>", MSG_VISUAL)
else if(I && I.w_class >= 3) //Otherwise they can only see large or normal items from a distance...