Refactor serialization copying to use source generators (#19412)

This commit is contained in:
DrSmugleaf
2023-08-22 18:14:33 -07:00
committed by GitHub
parent 08b43990ab
commit a88e747a0b
1737 changed files with 2532 additions and 2521 deletions

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Ghost.Components
{
[RegisterComponent]
[ComponentReference(typeof(SharedGhostComponent))]
public sealed class GhostComponent : SharedGhostComponent
public sealed partial class GhostComponent : SharedGhostComponent
{
public TimeSpan TimeOfDeath { get; set; } = TimeSpan.Zero;
@@ -29,5 +29,5 @@ namespace Content.Server.Ghost.Components
};
}
public sealed class BooActionEvent : InstantActionEvent { }
public sealed partial class BooActionEvent : InstantActionEvent { }
}

View File

@@ -1,7 +1,7 @@
namespace Content.Server.Ghost.Components
{
[RegisterComponent]
public sealed class GhostOnMoveComponent : Component
public sealed partial class GhostOnMoveComponent : Component
{
[DataField("canReturn")] public bool CanReturn { get; set; } = true;

View File

@@ -4,7 +4,7 @@ namespace Content.Server.Ghost.Roles.Components
{
[RegisterComponent]
[Access(typeof(GhostRoleSystem))]
public sealed class GhostRoleComponent : Component
public sealed partial class GhostRoleComponent : Component
{
[DataField("name")] private string _roleName = "Unknown";

View File

@@ -8,7 +8,7 @@ namespace Content.Server.Ghost.Roles.Components
/// </summary>
[RegisterComponent]
[Access(typeof(GhostRoleSystem))]
public sealed class GhostRoleMobSpawnerComponent : Component
public sealed partial class GhostRoleMobSpawnerComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)] [DataField("deleteOnSpawn")]
public bool DeleteOnSpawn = true;

View File

@@ -5,7 +5,7 @@ namespace Content.Server.Ghost.Roles.Components
/// </summary>
[RegisterComponent]
[Access(typeof(GhostRoleSystem))]
public sealed class GhostTakeoverAvailableComponent : Component
public sealed partial class GhostTakeoverAvailableComponent : Component
{
}
}

View File

@@ -4,7 +4,7 @@
/// This is used for a ghost role which can be toggled on and off at will, like a PAI.
/// </summary>
[RegisterComponent, Access(typeof(ToggleableGhostRoleSystem))]
public sealed class ToggleableGhostRoleComponent : Component
public sealed partial class ToggleableGhostRoleComponent : Component
{
[DataField("examineTextMindPresent")]
public string ExamineTextMindPresent = string.Empty;