using Robust.Shared.Audio; using Robust.Shared.GameStates; namespace Content.Shared.Ensnaring.Components; /// /// Use this on something you want to use to ensnare an entity with /// [RegisterComponent, NetworkedComponent] public sealed partial class EnsnaringComponent : Component { /// /// How long it should take to free someone else. /// [DataField] public float FreeTime = 3.5f; /// /// How long it should take for an entity to free themselves. /// [DataField] public float BreakoutTime = 30.0f; /// /// How much should this slow down the entities walk? /// [DataField] public float WalkSpeed = 0.9f; /// /// How much should this slow down the entities sprint? /// [DataField] public float SprintSpeed = 0.9f; /// /// How much stamina does the ensnare sap /// [DataField] public float StaminaDamage = 55f; /// /// How many times can the ensnare be applied to the same target? /// [DataField] public float MaxEnsnares = 1; /// /// Should this ensnare someone when thrown? /// [DataField] public bool CanThrowTrigger; /// /// What is ensnared? /// [DataField] public EntityUid? Ensnared; /// /// Should breaking out be possible when moving? /// [DataField] public bool CanMoveBreakout; [DataField] public SoundSpecifier? EnsnareSound = new SoundPathSpecifier("/Audio/Effects/snap.ogg"); } /// /// Used whenever you want to do something when someone becomes ensnared by the /// public sealed class EnsnareEvent : EntityEventArgs { public readonly float WalkSpeed; public readonly float SprintSpeed; public EnsnareEvent(float walkSpeed, float sprintSpeed) { WalkSpeed = walkSpeed; SprintSpeed = sprintSpeed; } } /// /// Used whenever you want to do something when someone is freed by the /// public sealed class EnsnareRemoveEvent : CancellableEntityEventArgs { public readonly float WalkSpeed; public readonly float SprintSpeed; public EnsnareRemoveEvent(float walkSpeed, float sprintSpeed) { WalkSpeed = walkSpeed; SprintSpeed = sprintSpeed; } }