Construction graph improvements (#17960)
This commit is contained in:
committed by
GitHub
parent
fbf1d476f2
commit
9243050e1a
28
Content.Shared/Construction/NodeEntities/StaticNodeEntity.cs
Normal file
28
Content.Shared/Construction/NodeEntities/StaticNodeEntity.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
||||
|
||||
namespace Content.Shared.Construction.NodeEntities;
|
||||
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public sealed class StaticNodeEntity : IGraphNodeEntity
|
||||
{
|
||||
[DataField("id", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public string? Id { get; }
|
||||
|
||||
public StaticNodeEntity()
|
||||
{
|
||||
}
|
||||
|
||||
public StaticNodeEntity(string id)
|
||||
{
|
||||
Id = id;
|
||||
}
|
||||
|
||||
public string? GetId(EntityUid? uid, EntityUid? userUid, GraphNodeEntityArgs args)
|
||||
{
|
||||
return Id;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user