Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lurker: bug fix, var disambiguation and redundant type checks #4922

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

Birdtalon
Copy link
Contributor

@Birdtalon Birdtalon commented Nov 13, 2023

Explain why it's good for the game

Testing Photographs and Procedure

Screenshots & Videos

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

Changelog

🆑
fix: Lurker can no longer tail jab through doors/structures.
code: Var disambiguation, cleanup and removal of redundant typechecks in lurker code.
/:cl:

@github-actions github-actions bot added Fix Fix one bug, make ten more Code Improvement Make the code longer labels Nov 13, 2023
@@ -84,7 +84,7 @@
target_carbon.set_effect(get_xeno_stun_duration(target_carbon, 3), SUPERSLOW)
next_slash_buffed = FALSE
var/datum/action/xeno_action/onclick/lurker_assassinate/ability = get_xeno_action_by_type(bound_xeno, /datum/action/xeno_action/onclick/lurker_assassinate)
if (ability && istype(ability))
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is already typechecked in get_xeno_action_by_type() so this should be redundant.

/proc/get_xeno_action_by_type(mob/living/carbon/xenomorph/X, typepath)
if (!istype(X))
CRASH("xeno_action.dm: get_xeno_action_by_type invoked with non-xeno first argument.")
for (var/datum/action/xeno_action/XA in X.actions)
if (istype(XA, typepath))
return XA
return null

@harryob harryob added this pull request to the merge queue Nov 16, 2023
Merged via the queue into cmss13-devs:master with commit 75bdfdb Nov 16, 2023
28 checks passed
cm13-github added a commit that referenced this pull request Nov 16, 2023
@Birdtalon Birdtalon deleted the lurker branch December 21, 2023 13:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Code Improvement Make the code longer Fix Fix one bug, make ten more
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Vampire Lurker can attack through podlocks
2 participants