Skip to content

Step Trigger Minor Refactor#884

Merged
VMSolidus merged 3 commits intoSimple-Station:masterfrom
VMSolidus:Fix-Mousetrap
Sep 9, 2024
Merged

Step Trigger Minor Refactor#884
VMSolidus merged 3 commits intoSimple-Station:masterfrom
VMSolidus:Fix-Mousetrap

Conversation

@VMSolidus
Copy link
Copy Markdown
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 ShadesMars 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
Co-authored-by: DEATHB4DEFEAT <77995199+DEATHB4DEFEAT@users.noreply.github.com>
Signed-off-by: VMSolidus <evilexecutive@gmail.com>
@github-actions github-actions bot added the Status: Merge Conflict FIX YOUR PR AAAGH label Sep 8, 2024
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Sep 8, 2024

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

Signed-off-by: VMSolidus <evilexecutive@gmail.com>
@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
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