1
0

NodeVis.cs 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. using Robust.Shared.Serialization;
  2. namespace Content.Shared.NodeContainer
  3. {
  4. public static class NodeVis
  5. {
  6. [Serializable, NetSerializable]
  7. public sealed class MsgEnable : EntityEventArgs
  8. {
  9. public MsgEnable(bool enabled)
  10. {
  11. Enabled = enabled;
  12. }
  13. public bool Enabled { get; }
  14. }
  15. [Serializable, NetSerializable]
  16. public sealed class MsgData : EntityEventArgs
  17. {
  18. public List<GroupData> Groups = new();
  19. public List<int> GroupDeletions = new();
  20. public Dictionary<int, string?> GroupDataUpdates = new();
  21. }
  22. [Serializable, NetSerializable]
  23. public sealed class GroupData
  24. {
  25. public int NetId;
  26. public string GroupId = "";
  27. public Color Color;
  28. public NodeDatum[] Nodes = Array.Empty<NodeDatum>();
  29. public string? DebugData;
  30. }
  31. [Serializable, NetSerializable]
  32. public sealed class NodeDatum
  33. {
  34. public NetEntity Entity;
  35. public int NetId;
  36. public int[] Reachable = Array.Empty<int>();
  37. public string Name = "";
  38. public string Type = "";
  39. }
  40. }
  41. }