Skip to content

Commit

Permalink
Invisible lurker pushing (#3857)
Browse files Browse the repository at this point in the history
# 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
<details>
<summary>Screenshots & Videos</summary>

Put screenshots and videos here with an empty line between the
screenshots and the `<details>` tags.

</details>


# Changelog

:cl: Morrow
balance: Lurkers now lose their invisibility when they run into a person
/:cl:

---------

Co-authored-by: harryob <[email protected]>
Co-authored-by: BeagleGaming1 <[email protected]>
  • Loading branch information
3 people committed Jul 14, 2023
1 parent eafd5c5 commit 705e878
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
5 changes: 5 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
15 changes: 15 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/castes/Lurker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 705e878

Please sign in to comment.