Files
tbd-station-14/Content.Shared/Item/ItemToggle/Components/ItemToggleActiveSoundComponent.cs
metalgearsloth 2166958bd0 AutoCompState + ItemToggle fixes (#23422)
* AutoCompState + ItemToggle fixes

Fix a lot of the comp states that are never actually networked and also cleaned up ItemToggle events a bunch. ItemToggle will still need some future work for lights and sounds.

* Also catch these
2024-01-03 17:24:02 +11:00

24 lines
819 B
C#

using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Item.ItemToggle.Components;
/// <summary>
/// Handles the active sound being played continuously with some items that are activated (ie e-sword hum).
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class ItemToggleActiveSoundComponent : Component
{
/// <summary>
/// The continuous noise this item makes when it's activated (like an e-sword's hum).
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField, AutoNetworkedField]
public SoundSpecifier? ActiveSound;
/// <summary>
/// Used when the item emits sound while active.
/// </summary>
[ViewVariables(VVAccess.ReadWrite), DataField]
public EntityUid? PlayingStream;
}