using Content.Shared.Tools; using Robust.Shared.Audio; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.Wires; [NetworkedComponent, RegisterComponent] [Access(typeof(SharedWiresSystem))] [AutoGenerateComponentState] public sealed partial class WiresPanelComponent : Component { /// /// Is the panel open for this entity's wires? /// [DataField("open")] [AutoNetworkedField] public bool Open; /// /// Should this entity's wires panel be visible at all? /// [ViewVariables] [AutoNetworkedField] public bool Visible = true; [DataField("screwdriverOpenSound")] public SoundSpecifier ScrewdriverOpenSound = new SoundPathSpecifier("/Audio/Machines/screwdriveropen.ogg"); [DataField("screwdriverCloseSound")] public SoundSpecifier ScrewdriverCloseSound = new SoundPathSpecifier("/Audio/Machines/screwdriverclose.ogg"); /// /// Amount of times in seconds it takes to open /// [DataField] public TimeSpan OpenDelay = TimeSpan.FromSeconds(1); /// /// The tool quality needed to open this panel. /// [DataField] public ProtoId OpeningTool = "Screwing"; /// /// Text showed on examine when the panel is closed. /// /// [DataField] public LocId? ExamineTextClosed = "wires-panel-component-on-examine-closed"; /// /// Text showed on examine when the panel is open. /// /// [DataField] public LocId? ExamineTextOpen = "wires-panel-component-on-examine-open"; } /// /// Event raised on a before its open state is about to be changed. /// [ByRefEvent] public record struct AttemptChangePanelEvent(bool Open, EntityUid? User, bool Cancelled = false); /// /// Event raised when a panel is opened or closed. /// [ByRefEvent] public readonly record struct PanelChangedEvent(bool Open);