Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -6,10 +6,10 @@ using Robust.Shared.Utility;
|
||||
namespace Content.Shared.Tools.Components
|
||||
{
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed class MultipleToolComponent : Component
|
||||
public sealed partial class MultipleToolComponent : Component
|
||||
{
|
||||
[DataDefinition]
|
||||
public sealed class ToolEntry
|
||||
public sealed partial class ToolEntry
|
||||
{
|
||||
[DataField("behavior", required: true)]
|
||||
public PrototypeFlags<ToolQualityPrototype> Behavior = new();
|
||||
@@ -25,7 +25,7 @@ namespace Content.Shared.Tools.Components
|
||||
}
|
||||
|
||||
[DataField("entries", required: true)]
|
||||
public ToolEntry[] Entries { get; } = Array.Empty<ToolEntry>();
|
||||
public ToolEntry[] Entries { get; private set; } = Array.Empty<ToolEntry>();
|
||||
|
||||
[ViewVariables]
|
||||
public uint CurrentEntry = 0;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
namespace Content.Shared.GPS
|
||||
{
|
||||
public abstract class SharedHandheldGPSComponent : Component
|
||||
public abstract partial class SharedHandheldGPSComponent : Component
|
||||
{
|
||||
[DataField("updateRate")]
|
||||
public float UpdateRate = 1.5f;
|
||||
|
||||
@@ -2,7 +2,7 @@ using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Tools.Components;
|
||||
|
||||
public abstract class SharedWeldableComponent : Component
|
||||
public abstract partial class SharedWeldableComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ using Robust.Shared.Serialization;
|
||||
namespace Content.Shared.Tools.Components
|
||||
{
|
||||
[NetworkedComponent]
|
||||
public abstract class SharedWelderComponent : Component
|
||||
public abstract partial class SharedWelderComponent : Component
|
||||
{
|
||||
public bool Lit { get; set; }
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ using Robust.Shared.Utility;
|
||||
namespace Content.Shared.Tools.Components
|
||||
{
|
||||
[RegisterComponent, NetworkedComponent] // TODO move tool system to shared, and make it a friend.
|
||||
public sealed class ToolComponent : Component
|
||||
public sealed partial class ToolComponent : Component
|
||||
{
|
||||
[DataField("qualities")]
|
||||
public PrototypeFlags<ToolQualityPrototype> Qualities { get; set; } = new();
|
||||
|
||||
@@ -5,6 +5,6 @@ namespace Content.Shared.Tools.Components
|
||||
/// or not to work.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class ToolForcePoweredComponent : Component
|
||||
public sealed partial class ToolForcePoweredComponent : Component
|
||||
{}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user