using Content.Shared.Actions; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; namespace Content.Shared.Silicons.Laws.Components; /// /// This is used for entities which are bound to silicon laws and can view them. /// [RegisterComponent, NetworkedComponent, Access(typeof(SharedSiliconLawSystem))] public sealed partial class SiliconLawBoundComponent : Component { /// /// The last entity that provided laws to this entity. /// [DataField] public EntityUid? LastLawProvider; } /// /// Event raised to get the laws that a law-bound entity has. /// /// Is first raised on the entity itself, then on the /// entity's station, then on the entity's grid, /// before being broadcast. /// /// [ByRefEvent] public record struct GetSiliconLawsEvent(EntityUid Entity) { public EntityUid Entity = Entity; public SiliconLawset Laws = new(); public bool Handled = false; } public sealed partial class ToggleLawsScreenEvent : InstantActionEvent { } [NetSerializable, Serializable] public enum SiliconLawsUiKey : byte { Key } [Serializable, NetSerializable] public sealed class SiliconLawBuiState : BoundUserInterfaceState { public List Laws; public HashSet? RadioChannels; public SiliconLawBuiState(List laws, HashSet? radioChannels) { Laws = laws; RadioChannels = radioChannels; } }