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

Mirror: Fix bypassing vaulting clumsy check with verb action. #314

Conversation

SimpleStation14
Copy link
Member

Mirror of PR #24977: Fix bypassing vaulting clumsy check with verb action. from space-wizards space-wizards/space-station-14

225bc3c5aeffbef6286b607b02cd24a8ad75a437

PR opened by Tayrtahn at 2024-02-05 21:32:50 UTC


PR changed 7 files with 101 additions and 39 deletions.

The PR had the following labels:

  • Status: Needs Review

Original Body

About the PR

Stops clumsy characters being able to climb/vault onto tables and such by using alt-click or the verb menu instead of drag-dropping.

This also fixes a separate bug where, when a clumsy character managed to pass the bonk check, the action would just cancel and the character didn't actually climb the object. Passing the check will now let the character climb.

Additionally, this fixes a oddity where the ability for mobs to climb was determined by whether or not they had feet/legs, which was arbitrary and problematic for creatures like slimes (which should be able to ooze up onto a table). This check could also be bypassed by using the verb instead of drag-dropping, so that was fixed too. The ability for mobs to climb is now controlled in the prototypes.

The default chance of a clumsy character bonking on a climbable has also been reduced from 75% to 50% to compensate somewhat.

Why / Balance

Fixes #24951
Fixes #17423
Fixes #25951

Technical details

ClimbSystem now raises AttemptClimbEvent as part of TryClimb, and aborts climbing if it gets cancelled. This makes sure that all code paths go through a clumsy check. BonkSystem now listens for AttemptClimbEvents and responds to them instead of trying to intercept DragDropEvents.
CanVault now gets checked in TryClimb as well, to prevent bypassing it.

The logic for climbing capabilities is now:

  • The presence of ClimbingComponent makes an entity able to be placed on surfaces like tables.
  • ClimbingComponent.CanClimb controls whether it can climb onto surfaces by drag-drop or verb.

The new field defaults to true to minimize changes to existing behavior. Some mobs will have gained the ability to climb when previously they couldn't, but that should be less impactful than the opposite and can be resolved by YML changes in the future.

Media

  • I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Breaking changes

Changelog

🆑

  • fix: Clumsy characters can no longer avoid bonking their heads by using the Climb verb.
  • tweak: Clumsy characters are less likely to bonk their heads when trying to climb.

@SimpleStation14 SimpleStation14 added the Pull Request Mirror Mirrors a PR from another Repo. Automatically applied by mirror bot label Apr 22, 2024
@SimpleStation14 SimpleStation14 marked this pull request as draft May 4, 2024 21:12
@VMSolidus VMSolidus marked this pull request as ready for review May 10, 2024 20:59
@VMSolidus VMSolidus merged commit 9d059cf into Simple-Station:master May 11, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Pull Request Mirror Mirrors a PR from another Repo. Automatically applied by mirror bot
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants