From 705e8788ddeceef06d32fe9b98cc05c82b73b727 Mon Sep 17 00:00:00 2001 From: morrowwolf Date: Fri, 14 Jul 2023 06:08:35 -0400 Subject: [PATCH] Invisible lurker pushing (#3857) # About the pull request This PR makes it so when you collide with a human as an invisible lurker you will become visible. # Explain why it's good for the game Being pushed by a fast and barely visible xeno is super cheesy. # Testing Photographs and Procedure
Screenshots & Videos Put screenshots and videos here with an empty line between the screenshots and the `
` tags.
# Changelog :cl: Morrow balance: Lurkers now lose their invisibility when they run into a person /:cl: --------- Co-authored-by: harryob Co-authored-by: BeagleGaming1 <56142455+BeagleGaming1@users.noreply.github.com> --- .../mob/living/carbon/xenomorph/Xenomorph.dm | 5 +++++ .../mob/living/carbon/xenomorph/castes/Lurker.dm | 15 +++++++++++++++ .../xenomorph/mutators/behavior_delegate.dm | 4 ++++ 3 files changed, 24 insertions(+) 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