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

Step Trigger Minor Refactor #884

Merged
merged 3 commits into from
Sep 9, 2024

Conversation

VMSolidus
Copy link
Member

Description

I made this PR in response to a bug report from Floof, where it was discovered that a "Minimum Size Felinid or Harpy" is instantaneously killed by mouse traps. Which confused me, because Felinids and Harpies are intended to be immune to floor traps like landmines, glass, and mouse traps. Then I discovered that mouse traps overwrite the step trigger cancellation, meaning that mouse traps will just completely ignore a Felinid/Harpy canceling the step trigger. Additionally, to my endless frustration, the Felinid/Harpy floor trap immunity is handled by a Tag and not a Component, which isn't really acceptable in this day and age.

I decided to take a little bit of a different approach to this problem, first by doing the usual code cleanup to EE standards. Then by adding a new StepTriggerImmuneComponent. This component acts as an early-exit for the entire StepTriggerSystem, immediately at the initial entrypoint, during the CanTrigger bool. This component is given to Felinids and Harpies by default, representing their "Extremely low density bodies" having too much surface area and not enough mass to trigger floor traps. Effectively, they are now working as originally intended, by having immunity to setting off landmines.

Because we have a trait point system, and this is coincidentally also a trait requested by Nuclear14, I have gone ahead and created a Trait that gives this component to anyone willing to pay the points for it.

Changelog

🆑

  • fix: Felinids and Harpies will now correctly never set off floor traps, such as landmines and mouse traps.
  • add: Trap Avoider has been added as a new trait, allowing characters to buy the innate ability to avoid floor traps. I would have named this "Light Step", after the trait from Fallout that shares its name and effect, but someone already gave that name to a different trait entirely.

@github-actions github-actions bot added Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: YML Changes any yml files labels Sep 7, 2024
@VMSolidus VMSolidus requested review from DEATHB4DEFEAT and FoxxoTrystan and removed request for DEATHB4DEFEAT September 7, 2024 15:13
@github-actions github-actions bot added the Status: Needs Review Someone please review this label Sep 7, 2024
Content.Server/Mousetrap/MousetrapSystem.cs Outdated Show resolved Hide resolved
Resources/Locale/en-US/traits/traits.ftl Outdated Show resolved Hide resolved
Resources/Prototypes/Traits/skills.yml Outdated Show resolved Hide resolved
Co-authored-by: DEATHB4DEFEAT <[email protected]>
Signed-off-by: VMSolidus <[email protected]>
@github-actions github-actions bot added the Status: Merge Conflict FIX YOUR PR AAAGH label Sep 8, 2024
Copy link
Contributor

github-actions bot commented Sep 8, 2024

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions github-actions bot removed the Status: Merge Conflict FIX YOUR PR AAAGH label Sep 8, 2024
@VMSolidus VMSolidus merged commit d0c5110 into Simple-Station:master Sep 9, 2024
11 checks passed
SimpleStation14 added a commit that referenced this pull request Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Changes: C# Changes any cs files Changes: Localization Changes any ftl files Changes: YML Changes any yml files Status: Needs Review Someone please review this
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants