using Robust.Shared.GameStates; using Robust.Shared.Serialization; namespace Content.Shared.Power; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] [Access(typeof(SharedPowerMonitoringConsoleSystem))] public sealed partial class PowerMonitoringCableNetworksComponent : Component { /// /// A dictionary of the all the nav map chunks that contain anchored power cables /// [ViewVariables, AutoNetworkedField] public Dictionary AllChunks = new(); /// /// A dictionary of the all the nav map chunks that contain anchored power cables /// that are directly connected to the console's current focus /// [ViewVariables, AutoNetworkedField] public Dictionary FocusChunks = new(); } [Serializable, NetSerializable] public struct PowerCableChunk { public readonly Vector2i Origin; /// /// Bitmask dictionary for power cables, 1 for occupied and 0 for empty. /// public int[] PowerCableData; public PowerCableChunk(Vector2i origin) { Origin = origin; PowerCableData = new int[Enum.GetNames(typeof(CableType)).Length]; } }