Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -9,10 +9,10 @@ namespace Content.Shared.EntityList
|
||||
{
|
||||
[ViewVariables]
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
[DataField("entities", customTypeSerializer: typeof(PrototypeIdListSerializer<EntityPrototype>))]
|
||||
public ImmutableList<string> EntityIds { get; } = ImmutableList<string>.Empty;
|
||||
public ImmutableList<string> EntityIds { get; private set; } = ImmutableList<string>.Empty;
|
||||
|
||||
public IEnumerable<EntityPrototype> Entities(IPrototypeManager? prototypeManager = null)
|
||||
{
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace Content.Shared.EntityList;
|
||||
public sealed class EntityLootTablePrototype : IPrototype
|
||||
{
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
public string ID { get; private set; } = default!;
|
||||
|
||||
[DataField("entries")]
|
||||
public ImmutableList<EntitySpawnEntry> Entries = ImmutableList<EntitySpawnEntry>.Empty;
|
||||
|
||||
Reference in New Issue
Block a user