Files
tbd-station-14/Content.Shared/Sound/Components/EmitSoundOnInteractUsingComponent.cs
blueDev2 daaa7c6de0 Add new component to Make sound on interact (#26523)
* Adds new Component: EmitSoundOnInteractUsing

* Missed an import

* File-scoping

* Replace ID check with Prototype check

* Moved component and system to shared. Set prediction to true.

* Removed impoper imports and changed namespace of component to reflect changed folder.

* Following function naming theme

* All this code is basically deltanedas's, but it was a learning experience for me

* Update Content.Shared/Sound/Components/EmitSoundOnInteractUsingComponent.cs

* Update Content.Shared/Sound/Components/EmitSoundOnInteractUsingComponent.cs

---------

Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
2024-03-31 13:20:44 +11:00

16 lines
509 B
C#

using Content.Shared.Whitelist;
using Robust.Shared.Prototypes;
using Robust.Shared.GameStates;
namespace Content.Shared.Sound.Components;
/// <summary>
/// Whenever this item is used upon by an entity, with a tag or component within a whitelist, in the hand of a user, play a sound
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed partial class EmitSoundOnInteractUsingComponent : BaseEmitSoundComponent
{
[DataField(required: true)]
public EntityWhitelist Whitelist = new();
}