Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Content.Server.Station.Components;
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
[Access(typeof(GameTicker))]
|
||||
public sealed class BecomesStationComponent : Component
|
||||
public sealed partial class BecomesStationComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Mapping only. Should use StationIds in all other
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Station.Components;
|
||||
/// All station entities will have this component.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(StationSystem))]
|
||||
public sealed class StationDataComponent : Component
|
||||
public sealed partial class StationDataComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The game map prototype, if any, associated with this station.
|
||||
@@ -22,5 +22,5 @@ public sealed class StationDataComponent : Component
|
||||
/// List of all grids this station is part of.
|
||||
/// </summary>
|
||||
[DataField("grids")]
|
||||
public readonly HashSet<EntityUid> Grids = new();
|
||||
public HashSet<EntityUid> Grids = new();
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
/// This is used for event eligibility.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class StationEventEligibleComponent : Component
|
||||
public sealed partial class StationEventEligibleComponent : Component
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Content.Server.Station.Components;
|
||||
/// Stores information about a station's job selection.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(StationJobsSystem)), PublicAPI]
|
||||
public sealed class StationJobsComponent : Component
|
||||
public sealed partial class StationJobsComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Total *round-start* jobs at station start.
|
||||
@@ -77,5 +77,5 @@ public sealed class StationJobsComponent : Component
|
||||
|
||||
[DataField("availableJobs", required: true,
|
||||
customTypeSerializer: typeof(PrototypeIdDictionarySerializer<List<int?>, JobPrototype>))]
|
||||
public readonly Dictionary<string, List<int?>> SetupAvailableJobs = default!;
|
||||
public Dictionary<string, List<int?>> SetupAvailableJobs = default!;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ namespace Content.Server.Station.Components;
|
||||
/// Indicates that a grid is a member of the given station.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(StationSystem))]
|
||||
public sealed class StationMemberComponent : Component
|
||||
public sealed partial class StationMemberComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Station that this grid is a part of.
|
||||
|
||||
@@ -6,18 +6,18 @@ namespace Content.Server.Station.Components;
|
||||
/// This is used for setting up a station's name.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class StationNameSetupComponent : Component
|
||||
public sealed partial class StationNameSetupComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// The name template to use for the station.
|
||||
/// If there's a name generator this should follow it's required format.
|
||||
/// </summary>
|
||||
[DataField("mapNameTemplate", required: true)]
|
||||
public string StationNameTemplate { get; } = default!;
|
||||
public string StationNameTemplate { get; private set; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// Name generator to use for the station, if any.
|
||||
/// </summary>
|
||||
[DataField("nameGenerator")]
|
||||
public StationNameGenerator? NameGenerator { get; }
|
||||
public StationNameGenerator? NameGenerator { get; private set; }
|
||||
}
|
||||
|
||||
@@ -6,6 +6,6 @@ namespace Content.Server.Station.Components;
|
||||
/// Controls spawning on the given station, tracking spawners present on it.
|
||||
/// </summary>
|
||||
[RegisterComponent, Access(typeof(StationSpawningSystem))]
|
||||
public sealed class StationSpawningComponent : Component
|
||||
public sealed partial class StationSpawningComponent : Component
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user