mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-01 16:47:26 +00:00
* Remove unused ProtoId * Remove unused variable * Move the entire of grappling into shared * Move grappler to Secdog base to enable all secdogs to grapple * Fix prediction on grappling from move to shared * Also block any StandUpAttempt events * Remove secdog hand disabling and up cooldown to 15 seconds * Add grapple activation modes * Implement new activation mode handling * Allow damage accumlated to release grapples * Add initial damage to activation mode * Immediately refresh modifiers on releasing of grapple * Check accumulated damage constantly, clear damage via timer * Only emit popups from server side * Update Laika's grappler component to use new activation mode * Add event for entering stamina crit * Release grapple when victim enters crit * Minor rewording of grapple starting * Typo * Rely solely on the shared system for grappling now * Change activation mode from class to interface
58 lines
1.7 KiB
C#
58 lines
1.7 KiB
C#
using Content.Shared._DV.Grappling.EntitySystems;
|
|
using Content.Shared.Alert;
|
|
using Content.Shared.DoAfter;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared._DV.Grappling.Components;
|
|
|
|
/// <summary>
|
|
/// Marks this entity as having been grappled.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent]
|
|
[Access(typeof(SharedGrapplingSystem))]
|
|
public sealed partial class GrappledComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The entity which is performing the grapple.
|
|
/// </summary>
|
|
[DataField]
|
|
public EntityUid Grappler = EntityUid.Invalid;
|
|
|
|
/// <summary>
|
|
/// How much time is required to escape.
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan EscapeTime = TimeSpan.FromSeconds(15);
|
|
|
|
/// <summary>
|
|
/// The in-progress DoAfter, if any.
|
|
/// Used to cancel the doAfter if the grappler manually releases their victim.
|
|
/// </summary>
|
|
[DataField]
|
|
public DoAfterId? DoAfterId = null;
|
|
|
|
/// <summary>
|
|
/// A list of all hands, if any, that have been disabled as part of the grapple
|
|
/// via a virtual item.
|
|
/// </summary>
|
|
[DataField]
|
|
public List<string> DisabledHands = new();
|
|
|
|
/// <summary>
|
|
/// Whether the grapple has fully taken effect and the grappled entity should be prone'd.
|
|
/// </summary>
|
|
[DataField]
|
|
public bool GrappleActivated = false;
|
|
|
|
/// <summary>
|
|
/// How much this entity should be slowed, before the grapple fully activates.
|
|
/// </summary>
|
|
[DataField]
|
|
public float? MovementSpeedModifier = null;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Raised when a player manually clicks the grappled icon to begin attempting to escape.
|
|
/// </summary>
|
|
public sealed partial class EscapeGrappleAlertEvent : BaseAlertEvent;
|