@@ -1,23 +1,22 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Sound.Components
|
||||
namespace Content.Shared.Sound.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on ActivateInWorld
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnActivateComponent : BaseEmitSoundComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on ActivateInWorld
|
||||
/// Whether or not to mark an interaction as handled after playing the sound. Useful if this component is
|
||||
/// used to play sound for some other component with activation functionality.
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnActivateComponent : BaseEmitSoundComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not to mark an interaction as handled after playing the sound. Useful if this component is
|
||||
/// used to play sound for some other component with activation functionality.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If false, you should be confident that the interaction will also be handled by some other system, as
|
||||
/// otherwise this might enable sound spamming, as use-delays are only initiated if the interaction was
|
||||
/// handled.
|
||||
/// </remarks>
|
||||
[DataField("handle")]
|
||||
public bool Handle = true;
|
||||
}
|
||||
/// <remarks>
|
||||
/// If false, you should be confident that the interaction will also be handled by some other system, as
|
||||
/// otherwise this might enable sound spamming, as use-delays are only initiated if the interaction was
|
||||
/// handled.
|
||||
/// </remarks>
|
||||
[DataField("handle")]
|
||||
public bool Handle = true;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
using Robust.Shared.GameStates;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
||||
|
||||
namespace Content.Shared.Sound.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnCollideComponent : BaseEmitSoundComponent
|
||||
{
|
||||
public static readonly TimeSpan CollideCooldown = TimeSpan.FromSeconds(0.2);
|
||||
|
||||
/// <summary>
|
||||
/// Minimum velocity required for the sound to play.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("minVelocity")]
|
||||
public float MinimumVelocity = 0.25f;
|
||||
|
||||
/// <summary>
|
||||
/// To avoid sound spam add a cooldown to it.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite), DataField("nextSound", customTypeSerializer:typeof(TimeOffsetSerializer))]
|
||||
public TimeSpan NextSound;
|
||||
}
|
||||
@@ -1,12 +1,11 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Sound.Components
|
||||
namespace Content.Shared.Sound.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on entity drop
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnDropComponent : BaseEmitSoundComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on entity drop
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnDropComponent : BaseEmitSoundComponent
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Sound.Components
|
||||
namespace Content.Shared.Sound.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on LandEvent
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnLandComponent : BaseEmitSoundComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on LandEvent
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnLandComponent : BaseEmitSoundComponent
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Sound.Components
|
||||
namespace Content.Shared.Sound.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on entity pickup
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnPickupComponent : BaseEmitSoundComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on entity pickup
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnPickupComponent : BaseEmitSoundComponent
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Sound.Components
|
||||
namespace Content.Shared.Sound.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on ThrowEvent
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnThrowComponent : BaseEmitSoundComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on ThrowEvent
|
||||
/// </summary>
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class EmitSoundOnThrowComponent : BaseEmitSoundComponent
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,23 +1,22 @@
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared.Sound.Components
|
||||
namespace Content.Shared.Sound.Components;
|
||||
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on UseInHand
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class EmitSoundOnUseComponent : BaseEmitSoundComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Simple sound emitter that emits sound on UseInHand
|
||||
/// Whether or not to mark an interaction as handled after playing the sound. Useful if this component is
|
||||
/// used to play sound for some other component with on-use functionality
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class EmitSoundOnUseComponent : BaseEmitSoundComponent
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether or not to mark an interaction as handled after playing the sound. Useful if this component is
|
||||
/// used to play sound for some other component with on-use functionality
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// If false, you should be confident that the interaction will also be handled by some other system, as
|
||||
/// otherwise this might enable sound spamming, as use-delays are only initiated if the interaction was
|
||||
/// handled.
|
||||
/// </remarks>
|
||||
[DataField("handle")]
|
||||
public bool Handle = true;
|
||||
}
|
||||
/// <remarks>
|
||||
/// If false, you should be confident that the interaction will also be handled by some other system, as
|
||||
/// otherwise this might enable sound spamming, as use-delays are only initiated if the interaction was
|
||||
/// handled.
|
||||
/// </remarks>
|
||||
[DataField("handle")]
|
||||
public bool Handle = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user