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

@@ -10,7 +10,7 @@ namespace Content.Shared.Clothing.Components;
/// </summary>
[Access(typeof(ToggleableClothingSystem))]
[RegisterComponent]
public sealed class AttachedClothingComponent : Component
public sealed partial class AttachedClothingComponent : Component
{
/// <summary>
/// The Id of the piece of clothing that this entity belongs to.

View File

@@ -12,7 +12,7 @@ namespace Content.Shared.Clothing.Components;
/// </summary>
[RegisterComponent, NetworkedComponent]
[Access(typeof(SharedChameleonClothingSystem))]
public sealed class ChameleonClothingComponent : Component
public sealed partial class ChameleonClothingComponent : Component
{
/// <summary>
/// Filter possible chameleon options by their slot flag.

View File

@@ -12,7 +12,7 @@ namespace Content.Shared.Clothing.Components;
[NetworkedComponent]
[RegisterComponent]
[Access(typeof(ClothingSystem), typeof(InventorySystem))]
public sealed class ClothingComponent : Component
public sealed partial class ClothingComponent : Component
{
[DataField("clothingVisuals")]
[Access(typeof(ClothingSystem), typeof(InventorySystem), Other = AccessPermissions.ReadExecute)] // TODO remove execute permissions.

View File

@@ -5,7 +5,7 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
namespace Content.Shared.Clothing.Components;
[RegisterComponent, NetworkedComponent]
public sealed class LoadoutComponent : Component
public sealed partial class LoadoutComponent : Component
{
/// <summary>
/// A list of starting gears, of which one will be given.

View File

@@ -13,7 +13,7 @@ namespace Content.Shared.Clothing.Components;
/// </summary>
[Access(typeof(ToggleableClothingSystem))]
[RegisterComponent]
public sealed class ToggleableClothingComponent : Component
public sealed partial class ToggleableClothingComponent : Component
{
public const string DefaultClothingContainerId = "toggleable-clothing";
@@ -28,7 +28,7 @@ public sealed class ToggleableClothingComponent : Component
/// Default clothing entity prototype to spawn into the clothing container.
/// </summary>
[DataField("clothingPrototype", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
public readonly string ClothingPrototype = default!;
public string ClothingPrototype = default!;
/// <summary>
/// The inventory slot that the clothing is equipped to.