Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -4,7 +4,7 @@ using Robust.Shared.Serialization;
|
||||
namespace Content.Shared.Clothing;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, Access(typeof(ClothingSpeedModifierSystem))]
|
||||
public sealed class ClothingSpeedModifierComponent : Component
|
||||
public sealed partial class ClothingSpeedModifierComponent : Component
|
||||
{
|
||||
[DataField("walkModifier", required: true)] [ViewVariables(VVAccess.ReadWrite)]
|
||||
public float WalkModifier = 1.0f;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -308,11 +308,11 @@ public sealed class ToggleableClothingSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ToggleClothingEvent : InstantActionEvent
|
||||
public sealed partial class ToggleClothingEvent : InstantActionEvent
|
||||
{
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class ToggleClothingDoAfterEvent : SimpleDoAfterEvent
|
||||
public sealed partial class ToggleClothingDoAfterEvent : SimpleDoAfterEvent
|
||||
{
|
||||
}
|
||||
|
||||
@@ -90,4 +90,4 @@ public abstract class SharedMagbootsSystem : EntitySystem
|
||||
}
|
||||
}
|
||||
|
||||
public sealed class ToggleMagbootsEvent : InstantActionEvent {}
|
||||
public sealed partial class ToggleMagbootsEvent : InstantActionEvent {}
|
||||
|
||||
Reference in New Issue
Block a user