diff --git a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm index 40d38c24085a..0b2625882ed8 100644 --- a/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm +++ b/code/modules/mob/living/carbon/xenomorph/Xenomorph.dm @@ -1087,3 +1087,8 @@ if(D) color_override = D.color new /obj/effect/temp_visual/dir_setting/bloodsplatter/xenosplatter(loc, splatter_dir, duration, color_override) + +/mob/living/carbon/xenomorph/Collide(atom/movable/movable_atom) + . = ..() + if(behavior_delegate) + behavior_delegate.on_collide(movable_atom) diff --git a/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm b/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm index fb75ed3900ac..5010857301e0 100644 --- a/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm +++ b/code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm @@ -151,3 +151,18 @@ . = list() var/invis_message = (invis_start_time == -1) ? "N/A" : "[(invis_duration-(world.time - invis_start_time))/10] seconds." . += "Invisibility Time Left: [invis_message]" + +/datum/behavior_delegate/lurker_base/on_collide(atom/movable/movable_atom) + . = ..() + + if(!ishuman(movable_atom)) + return + + if(!bound_xeno || !bound_xeno.stealth) + return + + var/datum/action/xeno_action/onclick/lurker_invisibility/lurker_invisibility_action = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/lurker_invisibility) + if(!lurker_invisibility_action) + return + + lurker_invisibility_action.invisibility_off() diff --git a/code/modules/mob/living/carbon/xenomorph/mutators/behavior_delegate.dm b/code/modules/mob/living/carbon/xenomorph/mutators/behavior_delegate.dm index 1cb563461138..53ca8c3a74da 100644 --- a/code/modules/mob/living/carbon/xenomorph/mutators/behavior_delegate.dm +++ b/code/modules/mob/living/carbon/xenomorph/mutators/behavior_delegate.dm @@ -104,3 +104,7 @@ /// Used to override an intent for some abilities that must force harm on next attack_alien() /datum/behavior_delegate/proc/override_intent(mob/living/carbon/target_carbon) return bound_xeno.a_intent + +/// Used to do something when a xeno collides with a movable atom +/datum/behavior_delegate/proc/on_collide(atom/movable/movable_atom) + return