ConstructionGraphEdge.cs 958 B

123456789101112131415161718192021222324252627282930
  1. using Content.Shared.Construction.Steps;
  2. namespace Content.Shared.Construction
  3. {
  4. [Serializable]
  5. [DataDefinition]
  6. public sealed partial class ConstructionGraphEdge
  7. {
  8. [DataField("steps")]
  9. private ConstructionGraphStep[] _steps = Array.Empty<ConstructionGraphStep>();
  10. [DataField("conditions", serverOnly: true)]
  11. private IGraphCondition[] _conditions = Array.Empty<IGraphCondition>();
  12. [DataField("completed", serverOnly: true)]
  13. private IGraphAction[] _completed = Array.Empty<IGraphAction>();
  14. [DataField("to", required:true)]
  15. public string Target { get; private set; } = string.Empty;
  16. [ViewVariables]
  17. public IReadOnlyList<IGraphCondition> Conditions => _conditions;
  18. [ViewVariables]
  19. public IReadOnlyList<IGraphAction> Completed => _completed;
  20. [ViewVariables]
  21. public IReadOnlyList<ConstructionGraphStep> Steps => _steps;
  22. }
  23. }