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 @@ using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototy
namespace Content.Server.Body.Components
{
[RegisterComponent, Access(typeof(BloodstreamSystem), (typeof(ChemistrySystem)))]
public sealed class BloodstreamComponent : Component
public sealed partial class BloodstreamComponent : Component
{
public static string DefaultChemicalsSolutionName = "chemicals";
public static string DefaultBloodSolutionName = "bloodstream";

View File

@@ -3,7 +3,7 @@
namespace Content.Server.Body.Components
{
[RegisterComponent, Access(typeof(BrainSystem))]
public sealed class BrainComponent : Component
public sealed partial class BrainComponent : Component
{
}
}

View File

@@ -5,7 +5,7 @@ namespace Content.Server.Body.Components
/// Handles hooking up a mask (breathing tool) / gas tank together and allowing the Owner to breathe through it.
/// </summary>
[RegisterComponent]
public sealed class InternalsComponent : Component
public sealed partial class InternalsComponent : Component
{
[ViewVariables] public EntityUid? GasTankEntity { get; set; }
[ViewVariables] public EntityUid? BreathToolEntity { get; set; }

View File

@@ -6,7 +6,7 @@ using Content.Shared.Chemistry.Components;
namespace Content.Server.Body.Components;
[RegisterComponent, Access(typeof(LungSystem))]
public sealed class LungComponent : Component
public sealed partial class LungComponent : Component
{
[DataField("air")]
[Access(typeof(LungSystem), Other = AccessPermissions.ReadExecute)] // FIXME Friends

View File

@@ -10,7 +10,7 @@ namespace Content.Server.Body.Components
/// Handles metabolizing various reagents with given effects.
/// </summary>
[RegisterComponent, Access(typeof(MetabolizerSystem))]
public sealed class MetabolizerComponent : Component
public sealed partial class MetabolizerComponent : Component
{
public float AccumulatedFrametime = 0.0f;
@@ -70,7 +70,7 @@ namespace Content.Server.Body.Components
/// This allows metabolizers to remove certain groups much faster, or not at all.
/// </summary>
[DataDefinition]
public sealed class MetabolismGroupEntry
public sealed partial class MetabolismGroupEntry
{
[DataField("id", required: true, customTypeSerializer:typeof(PrototypeIdSerializer<MetabolismGroupPrototype>))]
public string Id = default!;

View File

@@ -4,7 +4,7 @@ using Content.Shared.Damage;
namespace Content.Server.Body.Components
{
[RegisterComponent, Access(typeof(RespiratorSystem))]
public sealed class RespiratorComponent : Component
public sealed partial class RespiratorComponent : Component
{
/// <summary>
/// Saturation level. Reduced by CycleDelay each tick.

View File

@@ -6,7 +6,7 @@ using Content.Shared.Whitelist;
namespace Content.Server.Body.Components
{
[RegisterComponent, Access(typeof(StomachSystem), typeof(FoodSystem))]
public sealed class StomachComponent : Component
public sealed partial class StomachComponent : Component
{
public float AccumulatedFrameTime;

View File

@@ -4,7 +4,7 @@ namespace Content.Server.Body.Components;
[RegisterComponent]
[Access(typeof(ThermalRegulatorSystem))]
public sealed class ThermalRegulatorComponent : Component
public sealed partial class ThermalRegulatorComponent : Component
{
/// <summary>
/// Heat generated due to metabolism. It's generated via metabolism