-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mirror: Fix bypassing vaulting clumsy check with verb action. (#314)
## Mirror of PR #24977: [Fix bypassing vaulting clumsy check with verb action.](space-wizards/space-station-14#24977) from <img src="https://avatars.githubusercontent.com/u/10567778?v=4" alt="space-wizards" width="22"/> [space-wizards](https://github.com/space-wizards)/[space-station-14](https://github.com/space-wizards/space-station-14) ###### `225bc3c5aeffbef6286b607b02cd24a8ad75a437` PR opened by <img src="https://avatars.githubusercontent.com/u/85356?v=4" width="16"/><a href="https://github.com/Tayrtahn"> Tayrtahn</a> 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 --- <details open="true"><summary><h1>Original Body</h1></summary> > <!-- Please read these guidelines before opening your PR: https://docs.spacestation14.io/en/getting-started/pr-guideline --> > <!-- The text between the arrows are comments - they will not be visible on your PR. --> > > ## About the PR > <!-- What did you change in this 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 > <!-- Why was it changed? Link any discussions or issues here. Please discuss how this would affect game balance. --> > Fixes #24951 > Fixes #17423 > Fixes #25951 > > ## Technical details > <!-- If this is a code change, summarize at high level how your new code works. This makes it easier to review. --> > 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 > <!-- > PRs which make ingame changes (adding clothing, items, new features, etc) are required to have media attached that showcase the changes. > Small fixes/refactors are exempt. > Any media may be used in SS14 progress reports, with clear credit given. > > If you're unsure whether your PR will require media, ask a maintainer. > > Check the box below to confirm that you have in fact seen this (put an X in the brackets, like [X]): > --> > > - [x] I have added screenshots/videos to this PR showcasing its changes ingame, **or** this PR does not require an ingame showcase > > ## Breaking changes > <!-- > List any breaking changes, including namespace, public class/method/field changes, prototype renames; and provide instructions for fixing them. This will be pasted in #codebase-changes. > --> > > > **Changelog** > <!-- > Make players aware of new features and changes that could affect how they play the game by adding a Changelog entry. Please read the Changelog guidelines located at: https://docs.spacestation14.io/en/getting-started/pr-guideline#changelog > --> > > <!-- > Make sure to take this Changelog template out of the comment block in order for it to show up. > 🆑 > - add: Added fun! > - remove: Removed fun! > - tweak: Changed fun! > - fix: Fixed fun! > --> > 🆑 > - 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. </details> Co-authored-by: SimpleStation14 <Unknown>
- Loading branch information
1 parent
d26a99e
commit 9d059cf
Showing
7 changed files
with
101 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Content.Shared.Climbing.Events; | ||
|
||
[ByRefEvent] | ||
public record struct AttemptClimbEvent(EntityUid User, EntityUid Climber, EntityUid Climbable) | ||
{ | ||
public bool Cancelled; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
bonkable-success-message-others = { CAPITALIZE(THE($user)) } bonks { POSS-ADJ($user) } head against { $bonkable } | ||
bonkable-success-message-others = { CAPITALIZE(THE($user)) } bonks { POSS-ADJ($user) } head against { THE($bonkable) } | ||
bonkable-success-message-user = You bonk your head against { THE($bonkable) } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters