using Content.Shared.Construction.Prototypes;
using Content.Shared.MachineLinking;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Shared.Cargo.Components;
///
/// Handles teleporting in requested cargo after the specified delay.
///
[RegisterComponent, NetworkedComponent, Access(typeof(SharedCargoSystem))]
public sealed class CargoTelepadComponent : Component
{
///
/// The base amount of time it takes to teleport from the telepad
///
[DataField("baseDelay"), ViewVariables(VVAccess.ReadWrite)]
public float BaseDelay = 10f;
///
/// The actual amount of time it takes to teleport from the telepad
///
[DataField("delay"), ViewVariables(VVAccess.ReadWrite)]
public float Delay = 10f;
///
/// The machine part that affects
///
[DataField("machinePartTeleportDelay", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string MachinePartTeleportDelay = "Capacitor";
///
/// A multiplier applied to for each level of
///
[DataField("partRatingTeleportDelay"), ViewVariables(VVAccess.ReadWrite)]
public float PartRatingTeleportDelay = 0.8f;
///
/// How much time we've accumulated until next teleport.
///
[DataField("accumulator"), ViewVariables(VVAccess.ReadWrite)]
public float Accumulator;
[DataField("currentState")]
public CargoTelepadState CurrentState = CargoTelepadState.Unpowered;
[DataField("teleportSound")]
public SoundSpecifier TeleportSound = new SoundPathSpecifier("/Audio/Machines/phasein.ogg");
///
/// The paper-type prototype to spawn with the order information.
///
[DataField("printerOutput", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string PrinterOutput = "PaperCargoInvoice";
[DataField("receiverPort", customTypeSerializer: typeof(PrototypeIdSerializer)), ViewVariables(VVAccess.ReadWrite)]
public string ReceiverPort = "OrderReceiver";
}