using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared._Amour.Hallucinations;
[RegisterComponent]
public sealed partial class HallucinationsComponent : Component
{
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
public TimeSpan NextSecond = TimeSpan.Zero;
///
/// How far from humanoid can appear hallucination
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float Range = 7f;
///
/// How often (in seconds) hallucinations spawned
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float SpawnRate = 15f;
///
/// Minimum spawn chance per humanoid
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float MinChance = 0.1f;
///
/// Max spawn chance per humanoid
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float MaxChance = 100f;
///
/// How much chance increased per spawn
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public float IncreaseChance = 0.1f;
///
/// Max spawned hallucinations count for one spawn
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public int MaxSpawns = 3;
///
/// How much entities already spawned
///
public int SpawnedCount = 0;
///
/// Current spawn chance
///
public float CurChance = 0.1f;
///
/// List of prototypes that are spawned as a hallucination.
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public List Spawns = new();
///
/// Hallucinations pack proto
///
[DataField, ViewVariables(VVAccess.ReadWrite)]
public HallucinationsPrototype? Proto;
///
/// Currently selected for hallucinations layer
///
public int Layer = 50;
}