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

@@ -6,19 +6,19 @@ namespace Content.Server.Traits.Assorted;
/// This is used for the narcolepsy trait.
/// </summary>
[RegisterComponent, Access(typeof(NarcolepsySystem))]
public sealed class NarcolepsyComponent : Component
public sealed partial class NarcolepsyComponent : Component
{
/// <summary>
/// The random time between incidents, (min, max).
/// </summary>
[DataField("timeBetweenIncidents", required: true)]
public Vector2 TimeBetweenIncidents { get; }
public Vector2 TimeBetweenIncidents { get; private set; }
/// <summary>
/// The duration of incidents, (min, max).
/// </summary>
[DataField("durationOfIncident", required: true)]
public Vector2 DurationOfIncident { get; }
public Vector2 DurationOfIncident { get; private set; }
public float NextIncidentTime;
}

View File

@@ -4,7 +4,7 @@ namespace Content.Server.Traits.Assorted;
/// This is used for the uncloneable trait.
/// </summary>
[RegisterComponent]
public sealed class UncloneableComponent : Component
public sealed partial class UncloneableComponent : Component
{
}

View File

@@ -7,7 +7,7 @@ namespace Content.Server.Traits.Assorted;
/// On adding spawns wheelchair prototype and tries buckle player to it, then self removing
/// </summary>
[RegisterComponent, Access(typeof(WheelchairBoundSystem))]
public sealed class WheelchairBoundComponent : Component
public sealed partial class WheelchairBoundComponent : Component
{
[ViewVariables(VVAccess.ReadWrite)]
[DataField("wheelchairPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]