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

@@ -1,7 +1,7 @@
namespace Content.Server.Storage.Components;
[RegisterComponent]
public sealed class BluespaceLockerComponent : Component
public sealed partial class BluespaceLockerComponent : Component
{
/// <summary>
/// If length > 0, when something is added to the storage, it will instead be teleported to a random storage
@@ -85,7 +85,7 @@ public sealed class BluespaceLockerComponent : Component
}
[DataDefinition]
public record BluespaceLockerBehaviorProperties
public partial record BluespaceLockerBehaviorProperties
{
/// <summary>
/// Determines if gas will be transported.

View File

@@ -3,7 +3,7 @@ using Robust.Shared.Audio;
namespace Content.Server.Storage.Components;
[RegisterComponent]
public sealed class CursedEntityStorageComponent : Component
public sealed partial class CursedEntityStorageComponent : Component
{
[DataField("cursedSound")]
public SoundSpecifier CursedSound = new SoundPathSpecifier("/Audio/Effects/teleport_departure.ogg");

View File

@@ -5,7 +5,7 @@ using Robust.Shared.GameStates;
namespace Content.Server.Storage.Components;
[RegisterComponent, ComponentReference(typeof(SharedEntityStorageComponent))]
public sealed class EntityStorageComponent : SharedEntityStorageComponent, IGasMixtureHolder
public sealed partial class EntityStorageComponent : SharedEntityStorageComponent, IGasMixtureHolder
{
/// <summary>
/// Gas currently contained in this entity storage.

View File

@@ -9,7 +9,7 @@ namespace Content.Server.Storage.Components;
/// </summary>
[RegisterComponent]
[Access(typeof(PickRandomSystem))]
public sealed class PickRandomComponent : Component
public sealed partial class PickRandomComponent : Component
{
/// <summary>
/// Whitelist for potential picked items.

View File

@@ -13,7 +13,7 @@ namespace Content.Server.Storage.Components
/// </summary>
[RegisterComponent]
[Access(typeof(SecretStashSystem))]
public sealed class SecretStashComponent : Component
public sealed partial class SecretStashComponent : Component
{
/// <summary>
/// Max item size that can be fitted into secret stash.

View File

@@ -11,7 +11,7 @@ namespace Content.Server.Storage.Components
/// </summary>
[RegisterComponent]
[ComponentReference(typeof(SharedStorageComponent))]
public sealed class ServerStorageComponent : SharedStorageComponent
public sealed partial class ServerStorageComponent : SharedStorageComponent
{
public string LoggerName = "Storage";

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Storage.Components
/// Spawns items when used in hand.
/// </summary>
[RegisterComponent]
public sealed class SpawnItemsOnUseComponent : Component
public sealed partial class SpawnItemsOnUseComponent : Component
{
/// <summary>
/// The list of entities to spawn, with amounts and orGroups.

View File

@@ -4,7 +4,7 @@ using Content.Shared.Storage;
namespace Content.Server.Storage.Components
{
[RegisterComponent, Access(typeof(StorageSystem))]
public sealed class StorageFillComponent : Component
public sealed partial class StorageFillComponent : Component
{
[DataField("contents")] public List<EntitySpawnEntry> Contents = new();
}