using Content.Shared.Audio;
using Content.Shared.Sound;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Player;
using Robust.Shared.Serialization.Manager.Attributes;
namespace Content.Server.Movement.Components
{
///
/// Changes footstep sound
///
[RegisterComponent]
public sealed class FootstepModifierComponent : Component
{
[DataField("footstepSoundCollection", required: true)]
public SoundSpecifier SoundCollection = default!;
[DataField("variation")]
public float Variation = default;
public void PlayFootstep()
{
SoundSystem.Play(Filter.Pvs(Owner), SoundCollection.GetSound(), IoCManager.Resolve().GetComponent(Owner).Coordinates, AudioHelpers.WithVariation(Variation).WithVolume(-2f));
}
}
}