Special thanks to MrStonedOne.
This commit is contained in:
TalkingCactus
2016-08-30 14:13:55 -04:00
parent 37644b7109
commit 058095b2f5
3 changed files with 15 additions and 5 deletions
@@ -87,14 +87,16 @@
if(!search_objects)
var/list/Mobs = hearers(vision_range, targets_from) - src //Remove self, so we don't suicide
. += Mobs
for(var/M in mechas_list)
if(get_dist(M, targets_from) <= vision_range && can_see(targets_from, M, vision_range))
. += M
var/static/hostile_machines = typecacheof(list(/obj/machinery/porta_turret, /obj/mecha))
for(var/HM in typecache_filter_list(range(vision_range, targets_from), hostile_machines))
if(can_see(targets_from, HM, vision_range))
. += HM
else
var/list/Objects = oview(vision_range, targets_from)
. += Objects
/mob/living/simple_animal/hostile/proc/FindTarget(var/list/possible_targets, var/HasTargetsList = 0)//Step 2, filter down possible targets to things we actually care about
. = list()
if(!HasTargetsList)