Add MovementSound (#31313)
Mainly useful for medicalborg so you can get a looping sound and not footsteps playing over and over. Didn't actually update medborg because footsteps need updating. Not needed for AI.
This commit is contained in:
20
Content.Shared/Movement/Components/MovementSoundComponent.cs
Normal file
20
Content.Shared/Movement/Components/MovementSoundComponent.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Movement.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Plays a sound whenever InputMover is running.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
public sealed partial class MovementSoundComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Sound to play when InputMover has inputs.
|
||||
/// </summary>
|
||||
[DataField(required: true), AutoNetworkedField]
|
||||
public SoundSpecifier? Sound;
|
||||
|
||||
[DataField, AutoNetworkedField]
|
||||
public EntityUid? SoundEntity;
|
||||
}
|
||||
Reference in New Issue
Block a user