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:
@@ -492,7 +492,7 @@
|
||||
/obj/structure/bloodsucker/candelabrum/process()
|
||||
if(!lit)
|
||||
return
|
||||
for(var/mob/living/carbon/human/H in get_actual_viewers(7, src))
|
||||
for(var/mob/living/carbon/human/H in fov_viewers(7, src))
|
||||
var/datum/antagonist/vassal/T = H.mind.has_antag_datum(ANTAG_DATUM_VASSAL)
|
||||
if(AmBloodsucker(H) || T) //We dont want vassals or vampires affected by this
|
||||
return
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
if(!.)
|
||||
return
|
||||
// must have nobody around to see the cloak
|
||||
for(var/mob/living/M in get_actual_viewers(9, owner) - owner)
|
||||
for(var/mob/living/M in fov_viewers(9, owner) - owner)
|
||||
to_chat(owner, "<span class='warning'>You may only vanish into the shadows unseen.</span>")
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
vision_distance = notice_range, ignored_mobs = target) // Only people who AREN'T the target will notice this action.
|
||||
// Warn Feeder about Witnesses...
|
||||
var/was_unnoticed = TRUE
|
||||
for(var/mob/living/M in get_actual_viewers(notice_range, owner) - owner - target)
|
||||
for(var/mob/living/M in fov_viewers(notice_range, owner) - owner - target)
|
||||
if(M.client && !M.silicon_privileges && !M.eye_blind && !M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||
was_unnoticed = FALSE
|
||||
break
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
var/turf/T = get_turf(user)
|
||||
if(T && T.lighting_object && T.get_lumcount()>= 0.1)
|
||||
// B) Check for Viewers
|
||||
for(var/mob/living/M in get_actual_viewers(world.view, get_turf(owner)) - owner)
|
||||
for(var/mob/living/M in fov_viewers(world.view, get_turf(owner)) - owner)
|
||||
if(M.client && !M.silicon_privileges && !M.eye_blind)
|
||||
am_seen = TRUE
|
||||
if (!M.mind.has_antag_datum(ANTAG_DATUM_BLOODSUCKER))
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
to_chat(owner, "<span class='warning'>Your victim's eyes are glazed over. They cannot perceive you.</span>")
|
||||
return FALSE
|
||||
// Check: Target See Me? (behind wall)
|
||||
if(!(owner in target.visible_atoms()))
|
||||
if(!(owner in target.fov_view()))
|
||||
// Sub-Check: GET CLOSER
|
||||
//if (!(owner in range(target_range, get_turf(target)))
|
||||
// if (display_error)
|
||||
@@ -137,7 +137,7 @@
|
||||
if(istype(target) && success)
|
||||
target.notransform = FALSE
|
||||
REMOVE_TRAIT(target, TRAIT_COMBAT_MODE_LOCKED, src)
|
||||
if(istype(L) && target.stat == CONSCIOUS && (target in L.visible_atoms(10))) // They Woke Up! (Notice if within view)
|
||||
if(istype(L) && target.stat == CONSCIOUS && (target in L.fov_view(10))) // They Woke Up! (Notice if within view)
|
||||
to_chat(L, "<span class='warning'>[target] has snapped out of their trance.</span>")
|
||||
|
||||
|
||||
|
||||
@@ -1258,7 +1258,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
..()
|
||||
if(!target.halbody)
|
||||
var/list/possible_points = list()
|
||||
for(var/turf/open/floor/F in target.visible_atoms(world.view))
|
||||
for(var/turf/open/floor/F in target.fov_view(world.view))
|
||||
possible_points += F
|
||||
if(possible_points.len)
|
||||
var/turf/open/floor/husk_point = pick(possible_points)
|
||||
@@ -1289,7 +1289,7 @@ GLOBAL_LIST_INIT(hallucination_list, list(
|
||||
set waitfor = FALSE
|
||||
..()
|
||||
var/list/turf/startlocs = list()
|
||||
for(var/turf/open/T in target.visible_atoms(world.view+1)-view(world.view,target))
|
||||
for(var/turf/open/T in target.fov_view(world.view+1)-view(world.view,target))
|
||||
startlocs += T
|
||||
if(!startlocs.len)
|
||||
qdel(src)
|
||||
|
||||
@@ -707,7 +707,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
//this is a mob verb instead of atom for performance reasons
|
||||
//see /mob/verb/examinate() in mob.dm for more info
|
||||
//overridden here and in /mob/living for different point span classes and sanity checks
|
||||
/mob/dead/observer/pointed(atom/A as mob|obj|turf in visible_atoms())
|
||||
/mob/dead/observer/pointed(atom/A as mob|obj|turf in fov_view())
|
||||
if(!..())
|
||||
return 0
|
||||
usr.visible_message("<span class='deadsay'><b>[src]</b> points to [A].</span>")
|
||||
|
||||
@@ -121,7 +121,7 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
|
||||
return
|
||||
//Filth Reactions - Since miasma now exists
|
||||
var/filth_counter = 0 //Holder for the filth check cycle, basically contains how much filth dwarf sees numerically.
|
||||
for(var/fuck in owner.visible_atoms(7)) //hello byond for view loop.
|
||||
for(var/fuck in owner.fov_view(7)) //hello byond for view loop.
|
||||
if(istype(fuck, /mob/living/carbon/human))
|
||||
var/mob/living/carbon/human/H = fuck
|
||||
if(H.stat == DEAD || (HAS_TRAIT(H, TRAIT_FAKEDEATH)))
|
||||
|
||||
@@ -379,7 +379,7 @@
|
||||
stop_pulling()
|
||||
|
||||
//same as above
|
||||
/mob/living/pointed(atom/A as mob|obj|turf in visible_atoms())
|
||||
/mob/living/pointed(atom/A as mob|obj|turf in fov_view())
|
||||
if(incapacitated())
|
||||
return FALSE
|
||||
if(HAS_TRAIT(src, TRAIT_DEATHCOMA))
|
||||
|
||||
@@ -418,7 +418,7 @@
|
||||
else
|
||||
..()
|
||||
|
||||
/mob/living/simple_animal/bot/medbot/examinate(atom/A as mob|obj|turf in visible_atoms())
|
||||
/mob/living/simple_animal/bot/medbot/examinate(atom/A as mob|obj|turf in fov_view())
|
||||
..()
|
||||
if(!is_blind(src))
|
||||
chemscan(src, A)
|
||||
|
||||
@@ -125,7 +125,7 @@
|
||||
|
||||
// This loop will, at most, loop twice.
|
||||
for(var/atom/check in check_list)
|
||||
for(var/mob/living/M in get_actual_viewers(world.view + 1, check) - src)
|
||||
for(var/mob/living/M in fov_viewers(world.view + 1, check) - src)
|
||||
if(M.client && CanAttack(M) && !M.silicon_privileges)
|
||||
if(!M.eye_blind)
|
||||
return M
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
return 0
|
||||
|
||||
var/list/choices = list()
|
||||
for(var/mob/living/C in visible_atoms(1,src))
|
||||
for(var/mob/living/C in fov_view(1,src))
|
||||
if(C!=src && Adjacent(C))
|
||||
choices += C
|
||||
|
||||
|
||||
@@ -319,12 +319,12 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
return
|
||||
|
||||
//view() but with a signal, to allow blacklisting some of the otherwise visible atoms.
|
||||
/mob/proc/visible_atoms(dist = world.view)
|
||||
/mob/proc/fov_view(dist = world.view)
|
||||
. = view(dist, src)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_VISIBLE_ATOMS, .)
|
||||
SEND_SIGNAL(src, COMSIG_MOB_FOV_VIEW, .)
|
||||
|
||||
//mob verbs are faster than object verbs. See https://secure.byond.com/forum/?post=1326139&page=2#comment8198716 for why this isn't atom/verb/examine()
|
||||
/mob/verb/examinate(atom/A as mob|obj|turf in visible_atoms()) //It used to be oview(12), but I can't really say why
|
||||
/mob/verb/examinate(atom/A as mob|obj|turf in fov_view()) //It used to be oview(12), but I can't really say why
|
||||
set name = "Examine"
|
||||
set category = "IC"
|
||||
|
||||
@@ -349,7 +349,7 @@ mob/visible_message(message, self_message, blind_message, vision_distance = DEFA
|
||||
//note: ghosts can point, this is intended
|
||||
//visible_message will handle invisibility properly
|
||||
//overridden here and in /mob/dead/observer for different point span classes and sanity checks
|
||||
/mob/verb/pointed(atom/A as mob|obj|turf in visible_atoms())
|
||||
/mob/verb/pointed(atom/A as mob|obj|turf in fov_view())
|
||||
set name = "Point To"
|
||||
set category = "Object"
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
|
||||
|
||||
/obj/singularity/narsie/mezzer()
|
||||
for(var/mob/living/carbon/M in get_actual_viewers(consume_range, src))
|
||||
for(var/mob/living/carbon/M in fov_viewers(consume_range, src))
|
||||
if(M.stat == CONSCIOUS)
|
||||
if(!iscultist(M))
|
||||
to_chat(M, "<span class='cultsmall'>You feel conscious thought crumble away in an instant as you gaze upon [src.name]...</span>")
|
||||
|
||||
@@ -433,7 +433,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
env.merge(removed)
|
||||
air_update_turf()
|
||||
|
||||
for(var/mob/living/carbon/human/l in get_actual_viewers(HALLUCINATION_RANGE(power), src)) // If they can see it without mesons on. Bad on them.
|
||||
for(var/mob/living/carbon/human/l in fov_viewers(HALLUCINATION_RANGE(power), src)) // If they can see it without mesons on. Bad on them.
|
||||
if(!istype(l.glasses, /obj/item/clothing/glasses/meson))
|
||||
var/D = sqrt(1 / max(1, get_dist(l, src)))
|
||||
l.hallucination += power * config_hallucination_power * D
|
||||
@@ -666,7 +666,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
|
||||
|
||||
//Some poor sod got eaten, go ahead and irradiate people nearby.
|
||||
radiation_pulse(src, 3000, 2, TRUE)
|
||||
var/list/viewers = get_actual_viewers(world.view, src)
|
||||
var/list/viewers = fov_viewers(world.view, src)
|
||||
for(var/mob/living/L in range(10))
|
||||
investigate_log("has irradiated [key_name(L)] after consuming [AM].", INVESTIGATE_SUPERMATTER)
|
||||
if(L in viewers)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
if(M == hal_target)
|
||||
to_chat(hal_target, "<span class='userdanger'>[M] is hit by \a [src] in the chest!</span>")
|
||||
hal_apply_effect()
|
||||
else if(M in hal_target.visible_atoms())
|
||||
else if(M in hal_target.fov_view())
|
||||
to_chat(hal_target, "<span class='danger'>[M] is hit by \a [src] in the chest!!</span>")
|
||||
if(damage_type == BRUTE)
|
||||
var/splatter_dir = dir
|
||||
|
||||
@@ -535,7 +535,7 @@
|
||||
add_reagent(P, cached_results[P]*multiplier, null, chem_temp)
|
||||
|
||||
|
||||
var/list/seen = get_actual_viewers(4, get_turf(my_atom))//Sound and sight checkers
|
||||
var/list/seen = fov_viewers(4, get_turf(my_atom))//Sound and sight checkers
|
||||
var/iconhtml = icon2html(cached_my_atom, seen)
|
||||
if(cached_my_atom)
|
||||
if(!ismob(cached_my_atom)) // No bubbling mobs
|
||||
|
||||
@@ -99,7 +99,7 @@
|
||||
* return UI_state The state of the UI.
|
||||
**/
|
||||
/mob/living/proc/shared_living_ui_distance(atom/movable/src_object)
|
||||
if(!(src_object in visible_atoms())) // If the object is obscured, close it.
|
||||
if(!(src_object in fov_view())) // If the object is obscured, close it.
|
||||
return UI_CLOSE
|
||||
|
||||
var/dist = get_dist(src_object, src)
|
||||
|
||||
Reference in New Issue
Block a user