using Content.Shared.Abilities.Psionics;
using Robust.Shared.Player;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager;
namespace Content.Shared.Psionics;
[Prototype]
public sealed partial class PsionicPowerPrototype : IPrototype
{
///
/// The ID of the psionic power to use.
///
[IdDataField]
public string ID { get; } = default!;
///
/// The name of the psionic power.
///
[DataField(required: true)]
public string Name = default!;
///
/// What category of psionics does this power come from.
/// EG: Mentalics, Anomalists, Blood Cults, Heretics, etc.
///
[DataField]
public List PowerCategories = new();
///
/// These functions are called when a Psionic Power is added to a Psion.
///
[DataField(serverOnly: true)]
public PsionicPowerFunction[] InitializeFunctions { get; private set; } = Array.Empty();
///
/// These functions are called when a Psionic Power is removed from a Psion,
/// as a rule of thumb these should do the exact opposite of most of a power's init functions.
///
[DataField(serverOnly: true)]
public PsionicPowerFunction[] RemovalFunctions { get; private set; } = Array.Empty();
///
/// How many "Power Slots" this power occupies.
///
[DataField]
public int PowerSlotCost = 1;
}
/// This serves as a hook for psionic powers to modify the psionic component.
[ImplicitDataDefinitionForInheritors]
public abstract partial class PsionicPowerFunction
{
public abstract void OnAddPsionic(
EntityUid mob,
IComponentFactory factory,
IEntityManager entityManager,
ISerializationManager serializationManager,
ISharedPlayerManager playerManager,
ILocalizationManager loc,
PsionicComponent psionicComponent,
PsionicPowerPrototype proto);
}