using Content.Shared.Movement.Pulling.Systems; using Robust.Shared.GameStates; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared.Movement.Pulling.Components; /// /// Specifies an entity as being able to pull another entity with /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] [Access(typeof(PullingSystem))] public sealed partial class PullerComponent : Component { // My raiding guild /// /// Next time the puller can throw what is being pulled. /// Used to avoid spamming it for infinite spin + velocity. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField] public TimeSpan NextThrow; [DataField] public TimeSpan ThrowCooldown = TimeSpan.FromSeconds(1); // Before changing how this is updated, please see SharedPullerSystem.RefreshMovementSpeed public float WalkSpeedModifier => Pulling == default ? 1.0f : 0.95f; public float SprintSpeedModifier => Pulling == default ? 1.0f : 0.95f; /// /// Entity currently being pulled if applicable. /// [AutoNetworkedField, DataField] public EntityUid? Pulling; /// /// Does this entity need hands to be able to pull something? /// [DataField] public bool NeedsHands = true; }