Refactor serialization copying to use source generators (#19412)
This commit is contained in:
@@ -7,7 +7,7 @@ namespace Content.Server.Magic.Components;
|
||||
/// Spellbooks for having an entity learn spells as long as they've read the book and it's in their hand.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public sealed class SpellbookComponent : Component
|
||||
public sealed partial class SpellbookComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// List of spells that this book has. This is a combination of the WorldSpells, EntitySpells, and InstantSpells.
|
||||
@@ -20,15 +20,15 @@ public sealed class SpellbookComponent : Component
|
||||
/// </summary>
|
||||
[DataField("worldSpells", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, WorldTargetActionPrototype>))]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public readonly Dictionary<string, int> WorldSpells = new();
|
||||
public Dictionary<string, int> WorldSpells = new();
|
||||
|
||||
[DataField("entitySpells", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, EntityTargetActionPrototype>))]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public readonly Dictionary<string, int> EntitySpells = new();
|
||||
public Dictionary<string, int> EntitySpells = new();
|
||||
|
||||
[DataField("instantSpells", customTypeSerializer: typeof(PrototypeIdDictionarySerializer<int, InstantActionPrototype>))]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public readonly Dictionary<string, int> InstantSpells = new();
|
||||
public Dictionary<string, int> InstantSpells = new();
|
||||
|
||||
[DataField("learnTime")]
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
|
||||
Reference in New Issue
Block a user