using Content.Shared.Cargo;
using Content.Shared.Cargo.Components;
using Content.Shared.Sound;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Cargo.Components
{
///
/// Handles teleporting in requested cargo after the specified delay.
///
[RegisterComponent, Friend(typeof(CargoSystem))]
public sealed class CargoTelepadComponent : SharedCargoTelepadComponent
{
[DataField("delay")]
public float Delay = 20f;
///
/// How much time we've accumulated until next teleport.
///
[ViewVariables]
[DataField("accumulator")]
public float Accumulator = 0f;
[ViewVariables]
public readonly Stack TeleportQueue = new();
[ViewVariables]
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))]
public string PrinterOutput = "Paper";
}
}