using Content.Shared.FixedPoint;
using Content.Shared.Whitelist;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Store.Components;
///
/// Generates a specific type of currency that can be collected by stores.
/// Either by a store held on an item or on the player entity itself.
///
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState(fieldDeltas: true), AutoGenerateComponentPause]
public sealed partial class StoreCurrencyGeneratorComponent : Component
{
///
/// Whether this generator is enabled.
///
[DataField, AutoNetworkedField]
public bool Enabled = true;
///
/// The currency being generated.
///
[DataField, AutoNetworkedField]
public ProtoId Currency = "Telecrystal";
///
/// The current amount stored.
///
[DataField, AutoNetworkedField]
public FixedPoint2 Amount;
///
/// The maximum amount that can be stored at once.
///
[DataField, AutoNetworkedField]
public FixedPoint2 MaxAmount = 5;
///
/// The amount of the currency generated every .
///
[DataField, AutoNetworkedField]
public FixedPoint2 GeneratedAmount = 1;
///
/// Whitelist the store has to pass to be able to pull from this generator.
///
[DataField]
public EntityWhitelist? Whitelist;
///
/// Blacklist the store has to pass to be able to pull from this generator.
///
[DataField]
public EntityWhitelist? Blacklist;
///
/// The time between currency being generated.
///
[DataField, AutoNetworkedField]
public TimeSpan GenerationDelay = TimeSpan.FromSeconds(120);
///
/// The time at which the next currency will be generated.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoNetworkedField]
[AutoPausedField]
public TimeSpan NextGenerationTime = TimeSpan.Zero;
///
/// Makes this generator only examinable by valid stored. Otherwise, can be examined by anyone.
/// Shows the amount of currency and the type stored.
///
[DataField, AutoNetworkedField]
public bool StoreExaminable;
///
/// The sound to play when the currency is collected.
///
[DataField, AutoNetworkedField]
public SoundSpecifier? CollectSound;
///
/// Description to show when an eligible user attempts to collect from an empty generator.
///
[DataField]
public LocId EmptyPopup = "store-generator-collect-empty-popup";
///
/// Description to show to the user/store when it is collected from.
///
[DataField]
public LocId CollectPopup = "store-generator-collect-popup";
}