using Robust.Shared.Prototypes;
namespace Content.Shared.Magic.Components;
///
/// Spellbooks can grant one or more spells to the user. If marked as it will teach
/// the performer the spells and wipe the book.
/// Default behavior requires the book to be held in hand
///
[RegisterComponent, Access(typeof(SpellbookSystem))]
public sealed partial class SpellbookComponent : Component
{
///
/// List of spells that this book has. This is a combination of the WorldSpells, EntitySpells, and InstantSpells.
///
[ViewVariables]
public readonly List Spells = new();
// The three fields below are just used for initialization.
///
/// Dictionary of spell prototypes to charge counts.
/// If the charge count is null, it means the spell has infinite charges.
///
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public Dictionary SpellActions = new();
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public float LearnTime = .75f;
///
/// If true, the spell action stays even after the book is removed
///
[DataField]
[ViewVariables(VVAccess.ReadWrite)]
public bool LearnPermanently;
}