using Content.Shared.EntityTable.EntitySelectors;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Delivery;
///
/// Used to mark entities that are valid for spawning deliveries on.
/// If this requires power, it needs to be powered to count as a valid spawner.
///
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
public sealed partial class DeliverySpawnerComponent : Component
{
///
/// The entity table to select deliveries from.
///
[DataField(required: true)]
public EntityTableSelector Table = default!;
///
/// The max amount of deliveries this spawner can hold at a time.
///
[DataField]
public int MaxContainedDeliveryAmount = 20;
///
/// The currently held amount of deliveries.
/// They are stored as an int and only spawned on use, as to not create additional entities without the need to.
///
[DataField, AutoNetworkedField]
public int ContainedDeliveryAmount;
///
/// The sound to play when the spawner spawns a delivery.
///
[DataField]
public SoundSpecifier? SpawnSound = new SoundCollectionSpecifier("DeliverySpawnSounds", AudioParams.Default.WithVolume(-7));
///
/// The sound to play when a spawner is opened, and spills all the deliveries out.
///
[DataField]
public SoundSpecifier? OpenSound = new SoundCollectionSpecifier("storageRustle");
}