Fix sound-on-use spam (#7342)

This commit is contained in:
Leon Friedrich
2022-03-30 22:01:32 +13:00
committed by GitHub
parent 4bc73ac591
commit d55c9574c8
3 changed files with 32 additions and 4 deletions

View File

@@ -9,5 +9,16 @@ namespace Content.Server.Interaction.Components
[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;
}
}