using Content.Server.Explosion.EntitySystems;
using Robust.Shared.Analyzers;
using Robust.Shared.Containers;
using Robust.Shared.GameObjects;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.Manager.Attributes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.ViewVariables;
namespace Content.Server.Explosion.Components
{
[RegisterComponent, ComponentProtoName("ClusterGrenade"), Friend(typeof(ClusterGrenadeSystem))]
public sealed class ClusterGrenadeComponent : Component
{
public Container GrenadesContainer = default!;
///
/// What we fill our prototype with if we want to pre-spawn with grenades.
///
[ViewVariables] [DataField("fillPrototype", customTypeSerializer:typeof(PrototypeIdSerializer))]
public string? FillPrototype;
///
/// If we have a pre-fill how many more can we spawn.
///
public int UnspawnedCount;
///
/// Maximum grenades in the container.
///
[ViewVariables] [DataField("maxGrenadesCount")]
public int MaxGrenades = 3;
///
/// How long until our grenades are shot out and armed.
///
[ViewVariables(VVAccess.ReadWrite)] [DataField("delay")]
public float Delay = 1;
///
/// Max distance grenades can be thrown.
///
[ViewVariables(VVAccess.ReadWrite)] [DataField("distance")]
public float ThrowDistance = 50;
///
/// This is the end.
///
public bool CountDown;
}
}