From 846f33d67fee95fc854e77af341a63ffa1b8cfaf Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Sat, 17 Feb 2024 01:38:30 +0300 Subject: [PATCH] mergeconfilcts begone --- .../xenomorph/ai/movement/facehugger.dm | 18 ------------- .../mob/living/carbon/xenomorph/ai/xeno_ai.dm | 2 +- .../carbon/xenomorph/xeno_ai_interaction.dm | 25 +++++++++++++++---- 3 files changed, 21 insertions(+), 24 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/facehugger.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/facehugger.dm index 863a79e747..f82a55026c 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/facehugger.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/facehugger.dm @@ -52,24 +52,6 @@ return ..() -/mob/living/carbon/xenomorph/facehugger/check_mob_target(mob/living/carbon/checked_target) - if(!ishuman(checked_target)) - return FALSE // We don't wanna to attack anyone except humans - - if(istype(checked_target.wear_mask, /obj/item/clothing/mask/facehugger)) - return FALSE - - if(checked_target.status_flags & XENO_HOST) - return FALSE - - if(can_not_harm(checked_target)) - return FALSE - - if(checked_target.stat == DEAD) - return FALSE - - return TRUE - /mob/living/carbon/xenomorph/facehugger/proc/climb_in(shelter) set waitfor = FALSE 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 b15959b777..2c522b58d2 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/xeno_ai.dm @@ -339,7 +339,7 @@ #undef EXTRA_CHECK_DISTANCE_MULTIPLIER /mob/living/carbon/proc/ai_can_target(mob/living/carbon/xenomorph/ai_xeno) - if(!ai_check_stat()) + if(!ai_check_stat(ai_xeno)) return FALSE if(ai_xeno.can_not_harm(src)) 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 45ef729957..36ff944220 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm @@ -125,7 +125,7 @@ At bare minimum, make sure the relevant checks from parent types gets copied in ///////////////////////////// // MOBS // ///////////////////////////// -/mob/living/ai_check_stat() +/mob/living/ai_check_stat(mob/living/carbon/xenomorph/X) return stat == CONSCIOUS @@ -147,7 +147,7 @@ At bare minimum, make sure the relevant checks from parent types gets copied in . = ..() -/mob/living/carbon/human/ai_can_target(mob/living/carbon/xenomorph/ai_xeno) +/mob/living/carbon/human/ai_can_target(mob/living/carbon/xenomorph/X) . = ..() if(!.) return FALSE @@ -158,8 +158,20 @@ At bare minimum, make sure the relevant checks from parent types gets copied in if(HAS_TRAIT(src, TRAIT_NESTED)) return FALSE + if(isfacehugger(X)) + if(status_flags & XENO_HOST) + return FALSE + + if(istype(src, /obj/item/clothing/mask/facehugger)) + return FALSE + return TRUE +/mob/living/carbon/human/ai_check_stat(mob/living/carbon/xenomorph/X) + . = ..() + if(isfacehugger(X)) + return stat != DEAD + ///////////////////////////// // XENOS // @@ -180,17 +192,20 @@ At bare minimum, make sure the relevant checks from parent types gets copied in . = ..() -/mob/living/carbon/xenomorph/ai_can_target(mob/living/carbon/xenomorph/ai_xeno) +/mob/living/carbon/xenomorph/ai_can_target(mob/living/carbon/xenomorph/X) . = ..() if(!.) return FALSE - if(IS_SAME_HIVENUMBER(ai_xeno, src)) + if(isfacehugger(X)) + return FALSE + + if(IS_SAME_HIVENUMBER(X, src)) return FALSE return TRUE -/mob/living/carbon/xenomorph/ai_check_stat() +/mob/living/carbon/xenomorph/ai_check_stat(mob/living/carbon/xenomorph/X) return stat != DEAD // Should slash enemy xenos, even if they are critted out