diff --git a/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm b/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm index 2c522b58d2..cf951007be 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm @@ -338,14 +338,24 @@ #undef EXTRA_CHECK_DISTANCE_MULTIPLIER -/mob/living/carbon/proc/ai_can_target(mob/living/carbon/xenomorph/ai_xeno) - if(!ai_check_stat(ai_xeno)) +/mob/living/carbon/proc/ai_can_target(mob/living/carbon/xenomorph/X) + if(!ai_check_stat(X)) return FALSE - if(ai_xeno.can_not_harm(src)) + if(X.can_not_harm(src)) return FALSE - if(alpha <= 45 && get_dist(ai_xeno, src) > 2) + if(alpha <= 45 && get_dist(X, src) > 2) + return FALSE + + if(isfacehugger(X)) + if(status_flags & XENO_HOST) + return FALSE + + if(istype(wear_mask, /obj/item/clothing/mask/facehugger)) + return FALSE + + else if(HAS_TRAIT(src, TRAIT_NESTED)) return FALSE return TRUE diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm b/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm index 5aaf3b0684..58021c2ab2 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm @@ -155,16 +155,6 @@ At bare minimum, make sure the relevant checks from parent types gets copied in if(species.flags & IS_SYNTHETIC) return FALSE - if(HAS_TRAIT(src, TRAIT_NESTED)) - return FALSE - - if(isfacehugger(X)) - if(status_flags & XENO_HOST) - return FALSE - - if(istype(wear_mask, /obj/item/clothing/mask/facehugger)) - return FALSE - return TRUE /mob/living/carbon/human/ai_check_stat(mob/living/carbon/xenomorph/X)