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

@@ -16,18 +16,18 @@ namespace Content.Shared.Damage
/// functions to apply resistance sets and supports basic math operations to modify this dictionary.
/// </remarks>
[DataDefinition]
public sealed class DamageSpecifier : IEquatable<DamageSpecifier>
public sealed partial class DamageSpecifier : IEquatable<DamageSpecifier>
{
// These exist solely so the wiki works. Please do not touch them or use them.
[JsonPropertyName("types")]
[DataField("types", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<FixedPoint2, DamageTypePrototype>))]
[UsedImplicitly]
private readonly Dictionary<string,FixedPoint2>? _damageTypeDictionary;
private Dictionary<string,FixedPoint2>? _damageTypeDictionary;
[JsonPropertyName("groups")]
[DataField("groups", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<FixedPoint2, DamageGroupPrototype>))]
[UsedImplicitly]
private readonly Dictionary<string, FixedPoint2>? _damageGroupDictionary;
private Dictionary<string, FixedPoint2>? _damageGroupDictionary;
/// <summary>
/// Main DamageSpecifier dictionary. Most DamageSpecifier functions exist to somehow modifying this.