Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -7,10 +7,10 @@ namespace Content.Server.NodeContainer
|
||||
/// Creates and maintains a set of <see cref="Node"/>s.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class NodeContainerComponent : Component
|
||||
public sealed partial class NodeContainerComponent : Component
|
||||
{
|
||||
//HACK: THIS BEING readOnly IS A FILTHY HACK AND I HATE IT --moony
|
||||
[DataField("nodes", readOnly: true)] public Dictionary<string, Node> Nodes { get; } = new();
|
||||
[DataField("nodes", readOnly: true)] public Dictionary<string, Node> Nodes { get; private set; } = new();
|
||||
|
||||
[DataField("examinable")] public bool Examinable = false;
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Content.Server.NodeContainer.Nodes
|
||||
/// A <see cref="Node"/> that can reach other <see cref="AdjacentNode"/>s that are directly adjacent to it.
|
||||
/// </summary>
|
||||
[DataDefinition]
|
||||
public sealed class AdjacentNode : Node
|
||||
public sealed partial class AdjacentNode : Node
|
||||
{
|
||||
public override IEnumerable<Node> GetReachableNodes(TransformComponent xform,
|
||||
EntityQuery<NodeContainerComponent> nodeQuery,
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.NodeContainer.Nodes
|
||||
/// that they can "reach" and have the same <see cref="Node.NodeGroupID"/>.
|
||||
/// </summary>
|
||||
[ImplicitDataDefinitionForInheritors]
|
||||
public abstract class Node
|
||||
public abstract partial class Node
|
||||
{
|
||||
/// <summary>
|
||||
/// An ID used as a criteria for combining into groups. Determines which <see cref="INodeGroup"/>
|
||||
@@ -49,7 +49,7 @@ namespace Content.Server.NodeContainer.Nodes
|
||||
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("needAnchored")]
|
||||
public bool NeedAnchored { get; } = true;
|
||||
public bool NeedAnchored { get; private set; } = true;
|
||||
|
||||
public virtual void OnAnchorStateChanged(IEntityManager entityManager, bool anchored) { }
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Content.Server.NodeContainer.Nodes
|
||||
/// </summary>
|
||||
[DataDefinition]
|
||||
[Virtual]
|
||||
public class PipeNode : Node, IGasMixtureHolder, IRotatableNode
|
||||
public partial class PipeNode : Node, IGasMixtureHolder, IRotatableNode
|
||||
{
|
||||
/// <summary>
|
||||
/// The directions in which this pipe can connect to other pipes around it.
|
||||
|
||||
@@ -4,7 +4,7 @@ using Robust.Shared.Map.Components;
|
||||
namespace Content.Server.NodeContainer.Nodes
|
||||
{
|
||||
[DataDefinition]
|
||||
public sealed class PortPipeNode : PipeNode
|
||||
public sealed partial class PortPipeNode : PipeNode
|
||||
{
|
||||
public override IEnumerable<Node> GetReachableNodes(TransformComponent xform,
|
||||
EntityQuery<NodeContainerComponent> nodeQuery,
|
||||
|
||||
@@ -4,7 +4,7 @@ using Robust.Shared.Map.Components;
|
||||
namespace Content.Server.NodeContainer.Nodes
|
||||
{
|
||||
[DataDefinition]
|
||||
public sealed class PortablePipeNode : PipeNode
|
||||
public sealed partial class PortablePipeNode : PipeNode
|
||||
{
|
||||
public override IEnumerable<Node> GetReachableNodes(TransformComponent xform,
|
||||
EntityQuery<NodeContainerComponent> nodeQuery,
|
||||
|
||||
Reference in New Issue
Block a user