From abe4f0cfb4de27382e289180c0c81bcc78377387 Mon Sep 17 00:00:00 2001 From: xDanilcusx Date: Wed, 15 Nov 2023 02:54:52 +0300 Subject: [PATCH] small tweaks to home search logic --- .../mob/living/carbon/xenomorph/ai/movement/lurking.dm | 5 ++++- .../mob/living/carbon/xenomorph/xeno_ai_interaction.dm | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/ai/movement/lurking.dm b/code/modules/mob/living/carbon/xenomorph/ai/movement/lurking.dm index 8bab7a25bf..eeeb5b9ba8 100644 --- a/code/modules/mob/living/carbon/xenomorph/ai/movement/lurking.dm +++ b/code/modules/mob/living/carbon/xenomorph/ai/movement/lurking.dm @@ -85,11 +85,14 @@ if(structure.unslashable && structure.can_block_movement && structure.density) continue + if(structure.invisibility == 101) + continue + preferred = TRUE break for(var/turf/closed/touching_turf in orange(1, potential_home)) - if(get_dir(idle_xeno, touching_turf) in diagonals) + if(get_dir(potential_home, touching_turf) in diagonals) continue preferred = 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 d32474f39c..217f61d56f 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_ai_interaction.dm @@ -30,7 +30,7 @@ At bare minimum, make sure the relevant checks from parent types gets copied in return OBJECT_PENALTY /obj/structure/xeno_ai_act(mob/living/carbon/xenomorph/X) - if(unslashable || indestructible) + if(unslashable || indestructible || (climbable && islurker(X))) if(!X.action_busy) do_climb(X) return