using Content.Shared._Goobstation.TableSlam; // Goobstation - Table SLam using Content.Shared.Alert; using Content.Shared.Movement.Pulling.Systems; // Goobstation using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.Movement.Pulling.Components; /// /// Specifies an entity as being pullable by an entity with /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] [Access(typeof(Systems.PullingSystem), typeof(TableSlamSystem))] public sealed partial class PullableComponent : Component { /// /// The current entity pulling this component. /// [AutoNetworkedField, DataField] public EntityUid? Puller; /// /// The pull joint. /// [AutoNetworkedField, DataField] public string? PullJointId; public bool BeingPulled => Puller != null; /// /// If the physics component has FixedRotation should we keep it upon being pulled /// [Access(typeof(Systems.PullingSystem), Other = AccessPermissions.ReadExecute)] [ViewVariables(VVAccess.ReadWrite), DataField("fixedRotation")] public bool FixedRotationOnPull; /// /// What the pullable's fixedrotation was set to before being pulled. /// [Access(typeof(Systems.PullingSystem), Other = AccessPermissions.ReadExecute)] [AutoNetworkedField, DataField] public bool PrevFixedRotation; [DataField] public Dictionary PulledAlertAlertSeverity = new() { { GrabStage.No, 0 }, { GrabStage.Soft, 1 }, { GrabStage.Hard, 2 }, { GrabStage.Suffocate, 3 }, }; // WWDP edit start [AutoNetworkedField, DataField] public TimeSpan EscapeAttemptCooldown = TimeSpan.FromSeconds(2); // In seconds [AutoNetworkedField] public bool DisplayedCooldownPopup = true; [AutoNetworkedField, DataField] public TimeSpan PullAttemptCooldown = TimeSpan.FromSeconds(1.5); // no locking with spam pulls [AutoNetworkedField, DataField] public TimeSpan NextPullAttempt = TimeSpan.Zero; // WWDP edit end [AutoNetworkedField, DataField] public GrabStage GrabStage = GrabStage.No; [AutoNetworkedField, DataField] public float GrabEscapeChance = 1f; [AutoNetworkedField] public TimeSpan NextEscapeAttempt = TimeSpan.Zero; /// /// If this pullable being tabled. /// [DataField, AutoNetworkedField] public bool BeingTabled = false; /// /// Constant for tabling throw math /// [DataField] public float BasedTabledForceSpeed = 5f; /// /// Stamina damage. taken on tabled /// [DataField] public float TabledStaminaDamage = 40f; /// /// Damage taken on being tabled. /// [DataField] public float TabledDamage = 5f; // Goobstation end /// /// Whether the entity is currently being actively pushed by the puller. /// If true, the entity will be able to enter disposals upon colliding with them, and the like. /// [DataField, AutoNetworkedField] public bool BeingActivelyPushed = false; [DataField] public ProtoId PulledAlert = "Pulled"; } public sealed partial class StopBeingPulledAlertEvent : BaseAlertEvent;