using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Map; namespace Content.Shared.Clothing.Components; /// /// Indicates that the clothing entity emits sound when it moves. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] public sealed partial class EmitsSoundOnMoveComponent : Component { [ViewVariables(VVAccess.ReadWrite)] [DataField(required: true), AutoNetworkedField] public SoundSpecifier SoundCollection = default!; [ViewVariables(VVAccess.ReadWrite)] [DataField("requiresGravity"), AutoNetworkedField] public bool RequiresGravity = true; [ViewVariables(VVAccess.ReadOnly)] public EntityCoordinates LastPosition = EntityCoordinates.Invalid; /// /// The distance moved since the played sound. /// [ViewVariables(VVAccess.ReadOnly)] public float SoundDistance = 0f; /// /// Whether this item is equipped in a inventory item slot. /// [ViewVariables(VVAccess.ReadOnly)] public bool IsSlotValid = true; /// /// If worn, how far the wearer has to walk in order to make a sound. /// [DataField] public float DistanceWalking = 1.5f; /// /// If worn, how far the wearer has to sprint in order to make a sound. /// [DataField] public float DistanceSprinting = 2f; /// /// Whether or not this item must be worn in order to make sounds. /// [DataField] public bool RequiresWorn; }