Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -6,12 +6,11 @@ using Robust.Shared.Serialization.Manager;
|
||||
namespace Content.Server.Jobs
|
||||
{
|
||||
[UsedImplicitly]
|
||||
public sealed class AddComponentSpecial : JobSpecial
|
||||
public sealed partial class AddComponentSpecial : JobSpecial
|
||||
{
|
||||
|
||||
[DataField("components")]
|
||||
[AlwaysPushInheritance]
|
||||
public ComponentRegistry Components { get; } = new();
|
||||
public ComponentRegistry Components { get; private set; } = new();
|
||||
|
||||
public override void AfterEquip(EntityUid mob)
|
||||
{
|
||||
|
||||
@@ -11,11 +11,11 @@ namespace Content.Server.Jobs;
|
||||
/// Adds implants on spawn to the entity
|
||||
/// </summary>
|
||||
[UsedImplicitly]
|
||||
public sealed class AddImplantSpecial : JobSpecial
|
||||
public sealed partial class AddImplantSpecial : JobSpecial
|
||||
{
|
||||
|
||||
[DataField("implants", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<EntityPrototype>))]
|
||||
public HashSet<String> Implants { get; } = new();
|
||||
public HashSet<String> Implants { get; private set; } = new();
|
||||
|
||||
public override void AfterEquip(EntityUid mob)
|
||||
{
|
||||
|
||||
@@ -9,13 +9,13 @@ namespace Content.Server.Jobs
|
||||
{
|
||||
[UsedImplicitly]
|
||||
[DataDefinition]
|
||||
public sealed class GiveItemOnHolidaySpecial : JobSpecial
|
||||
public sealed partial class GiveItemOnHolidaySpecial : JobSpecial
|
||||
{
|
||||
[DataField("holiday", customTypeSerializer:typeof(PrototypeIdSerializer<HolidayPrototype>))]
|
||||
public string Holiday { get; } = string.Empty;
|
||||
public string Holiday { get; private set; } = string.Empty;
|
||||
|
||||
[DataField("prototype", customTypeSerializer:typeof(PrototypeIdSerializer<EntityPrototype>))]
|
||||
public string Prototype { get; } = string.Empty;
|
||||
public string Prototype { get; private set; } = string.Empty;
|
||||
|
||||
public override void AfterEquip(EntityUid mob)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user