mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-20 06:58:55 +03:00
<!-- This is a semi-strict format, you can add/remove sections as needed but the order/format should be kept the same Remove these comments before submitting --> # Description <!-- Explain this PR in as much detail as applicable Some example prompts to consider: How might this affect the game? The codebase? What might be some alternatives to this? How/Who does this benefit/hurt [the game/codebase]? --> Previously, the "TryStopPull" function didn't make you drop a virtualitem if you were strangling somebody, meaning that you could lose use of a hand until disarmed because it would still consider you to be holding the person. I fixed that, as well as additionally cleaned up the table slam system, which should make it run a bit smoother and be functionally about the same. The "tableable" and "posttabled" components were removed, because they shouldn't have existed in the first place. The only notable non-bugfix change that's player facing is that shoving people who are knocked down on any climbable entity stuns them (as opposed to just tables), but it's a rather minor change and I intend on reworking it pretty heavily once my [other PR](https://github.com/Simple-Station/Einstein-Engines/pull/2199) is reviewed. On the backend, I added an optional variable to "TryClimb" that gives you an option to skip the do-after. If it's possible to change these actions to be predicted, I'd be interested in learning how. --- # TODO <!-- A list of everything you have to do before this PR is "complete" You probably won't have to complete everything before merging but it's good to leave future references --> - [ ] Task - [x] Completed Task --- <!-- This is default collapsed, readers click to expand it and see all your media The PR media section can get very large at times, so this is a good way to keep it clean The title is written using HTML tags The title must be within the <summary> tags or you won't see it --> <details><summary><h1>Media</h1></summary> <p> Note that glass tables do much more damage when slammed into, and even more if they would shatter when attempting to climb it. https://github.com/user-attachments/assets/bc0a12e3-0b67-4d61-aa4e-785e3210c3bb </p> </details> --- # Changelog <!-- You can add an author after the `🆑` to change the name that appears in the changelog (ex: `🆑 Death`) Leaving it blank will default to your GitHub display name This includes all available types for the changelog --> 🆑 - tweak: Table slamming should be more consistent. - fix: You should properly be able to use both hands after letting somebody go from a stranglehold.
31 lines
940 B
C#
31 lines
940 B
C#
using Content.Shared.Standing;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.Stunnable;
|
|
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState, Access(typeof(SharedStunSystem))]
|
|
public sealed partial class KnockedDownComponent : Component
|
|
{
|
|
[DataField("helpInterval"), AutoNetworkedField]
|
|
public float HelpInterval = 1f;
|
|
|
|
[DataField("helpAttemptSound")]
|
|
public SoundSpecifier StunAttemptSound = new SoundPathSpecifier("/Audio/Effects/thudswoosh.ogg");
|
|
|
|
[DataField]
|
|
public DropHeldItemsBehavior DropHeldItemsBehavior = DropHeldItemsBehavior.AlwaysDrop;
|
|
|
|
[DataField]
|
|
public bool FollowUp = false;
|
|
|
|
[ViewVariables, AutoNetworkedField]
|
|
public float HelpTimer = 0f;
|
|
|
|
/// <summary>
|
|
/// WWDP - friction modifier for being unconscious, slipped etc.
|
|
/// </summary>
|
|
[DataField, AutoNetworkedField]
|
|
public float FrictionMultiplier = 1f;
|
|
}
|