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

@@ -15,7 +15,7 @@ using Robust.Shared.Utility;
namespace Content.Server.GameTicking.Rules.Components;
[RegisterComponent, Access(typeof(NukeopsRuleSystem), typeof(LoneOpsSpawnRule))]
public sealed class NukeopsRuleComponent : Component
public sealed partial class NukeopsRuleComponent : Component
{
/// <summary>
/// The minimum needed amount of players
@@ -98,19 +98,19 @@ public sealed class NukeopsRuleComponent : Component
/// Cached starting gear prototypes.
/// </summary>
[DataField("startingGearPrototypes")]
public readonly Dictionary<string, StartingGearPrototype> StartingGearPrototypes = new ();
public Dictionary<string, StartingGearPrototype> StartingGearPrototypes = new ();
/// <summary>
/// Cached operator name prototypes.
/// </summary>
[DataField("operativeNames")]
public readonly Dictionary<string, List<string>> OperativeNames = new();
public Dictionary<string, List<string>> OperativeNames = new();
/// <summary>
/// Data to be used in <see cref="OnMindAdded"/> for an operative once the Mind has been added.
/// </summary>
[DataField("operativeMindPendingData")]
public readonly Dictionary<EntityUid, string> OperativeMindPendingData = new();
public Dictionary<EntityUid, string> OperativeMindPendingData = new();
/// <summary>
/// Players who played as an operative at some point in the round.
@@ -118,7 +118,7 @@ public sealed class NukeopsRuleComponent : Component
/// </summary>
/// todo: don't store sessions, dingus
[DataField("operativePlayers")]
public readonly Dictionary<string, IPlayerSession> OperativePlayers = new();
public Dictionary<string, IPlayerSession> OperativePlayers = new();
[DataField("faction", customTypeSerializer: typeof(PrototypeIdSerializer<NpcFactionPrototype>), required: true)]
public string Faction = default!;