2021-07-25 13:37:01 +02:00
|
|
|
using Content.Server.Sound.Components;
|
2019-06-03 23:16:47 +05:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Interaction.Components
|
2019-06-03 23:16:47 +05:00
|
|
|
{
|
|
|
|
|
/// <summary>
|
2021-06-19 11:35:56 +02:00
|
|
|
/// Simple sound emitter that emits sound on UseInHand
|
2019-06-03 23:16:47 +05:00
|
|
|
/// </summary>
|
2019-07-31 15:02:36 +02:00
|
|
|
[RegisterComponent]
|
2022-02-16 00:23:23 -07:00
|
|
|
public sealed class EmitSoundOnUseComponent : BaseEmitSoundComponent
|
2019-06-03 23:16:47 +05:00
|
|
|
{
|
2022-03-30 22:01:32 +13:00
|
|
|
/// <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;
|
2019-06-03 23:16:47 +05:00
|
|
|
}
|
|
|
|
|
}
|