From a2842652e04b5a7b2e84e8ca2b39295b6533cec9 Mon Sep 17 00:00:00 2001 From: Fox McCloud Date: Mon, 1 Apr 2019 17:11:56 -0400 Subject: [PATCH] typecache for wants objects --- code/modules/mob/living/simple_animal/hostile/hostile.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index ccbd37f2f4c..50568fb37d0 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -53,6 +53,7 @@ if(!targets_from) targets_from = src environment_target_typecache = typecacheof(environment_target_typecache) + wanted_objects = typecacheof(wanted_objects) /mob/living/simple_animal/hostile/Destroy() targets_from = null @@ -205,7 +206,7 @@ return 0 return 1 if(isobj(the_target)) - if(is_type_in_list(the_target, wanted_objects)) + if(is_type_in_typecache(the_target, wanted_objects)) return 1 return 0