mirror of
https://github.com/vgstation-coders/vgstation13.git
synced 2025-12-10 18:32:03 +00:00
Merge pull request #6599 from eswordthecat/list-targets
ohearers instead of subtracting src
This commit is contained in:
@@ -76,16 +76,17 @@
|
|||||||
|
|
||||||
/mob/living/simple_animal/hostile/proc/ListTargets()//Step 1, find out what we can see
|
/mob/living/simple_animal/hostile/proc/ListTargets()//Step 1, find out what we can see
|
||||||
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/simple_animal/hostile/proc/ListTargets() called tick#: [world.time]")
|
//writepanic("[__FILE__].[__LINE__] ([src.type])([usr ? usr.ckey : ""]) \\/mob/living/simple_animal/hostile/proc/ListTargets() called tick#: [world.time]")
|
||||||
var/list/L = list()
|
var/list/L = new()
|
||||||
if(!search_objects)
|
|
||||||
var/list/Mobs = hearers(vision_range, src) - src //Remove self, so we don't suicide
|
if (!search_objects)
|
||||||
L += Mobs
|
L.Add(ohearers(vision_range, src))
|
||||||
for(var/obj/mecha/M in mechas_list)
|
|
||||||
if(get_dist(M, src) <= vision_range && can_see(src, M, vision_range))
|
for (var/obj/mecha/M in mechas_list)
|
||||||
L += M
|
if (get_dist(M, src) <= vision_range && can_see(src, M, vision_range))
|
||||||
|
L.Add(M)
|
||||||
else
|
else
|
||||||
var/list/Objects = oview(vision_range, src)
|
L.Add(oview(vision_range, src))
|
||||||
L += Objects
|
|
||||||
return L
|
return L
|
||||||
|
|
||||||
/mob/living/simple_animal/hostile/proc/FindTarget()//Step 2, filter down possible targets to things we actually care about
|
/mob/living/simple_animal/hostile/proc/FindTarget()//Step 2, filter down possible targets to things we actually care about
|
||||||
|
|||||||
Reference in New Issue
Block a user