Construction graph improvements (#17960)

This commit is contained in:
Vera Aguilera Puerto
2023-07-13 12:23:52 +02:00
committed by GitHub
parent fbf1d476f2
commit 9243050e1a
20 changed files with 236 additions and 249 deletions

View File

@@ -1,4 +1,6 @@
using System.Diagnostics.CodeAnalysis;
using Content.Shared.Construction.NodeEntities;
using Content.Shared.Construction.Serialization;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -23,8 +25,11 @@ namespace Content.Shared.Construction
[ViewVariables]
public IReadOnlyList<IGraphAction> Actions => _actions;
[DataField("entity", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public string? Entity { get; private set; }
[DataField("transform")]
public IGraphTransform[] TransformLogic = Array.Empty<IGraphTransform>();
[DataField("entity", customTypeSerializer: typeof(GraphNodeEntitySerializer), serverOnly:true)]
public IGraphNodeEntity Entity { get; private set; } = new NullNodeEntity();
public ConstructionGraphEdge? GetEdge(string target)
{