2022-06-03 10:56:11 -05:00
|
|
|
using Content.Server.Cargo.Systems;
|
2021-06-09 22:19:39 +02:00
|
|
|
using Content.Shared.Cargo;
|
2022-02-15 15:01:45 +11:00
|
|
|
using Content.Shared.Cargo.Components;
|
2022-05-12 03:24:24 -07:00
|
|
|
using Content.Shared.MachineLinking;
|
2021-07-10 17:35:33 +02:00
|
|
|
using Content.Shared.Sound;
|
2021-11-11 02:15:23 +13:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
2020-12-18 20:14:26 -06:00
|
|
|
|
2021-06-09 22:19:39 +02:00
|
|
|
namespace Content.Server.Cargo.Components
|
2020-12-18 20:14:26 -06:00
|
|
|
{
|
2022-02-15 15:01:45 +11:00
|
|
|
/// <summary>
|
|
|
|
|
/// Handles teleporting in requested cargo after the specified delay.
|
|
|
|
|
/// </summary>
|
2022-06-07 15:26:28 +02:00
|
|
|
[RegisterComponent, Access(typeof(CargoSystem))]
|
2022-02-15 15:01:45 +11:00
|
|
|
public sealed class CargoTelepadComponent : SharedCargoTelepadComponent
|
2020-12-18 20:14:26 -06:00
|
|
|
{
|
2022-02-15 15:01:45 +11:00
|
|
|
[DataField("delay")]
|
2022-06-23 14:36:47 +10:00
|
|
|
public float Delay = 45f;
|
2020-12-18 20:14:26 -06:00
|
|
|
|
2021-11-11 02:15:23 +13:00
|
|
|
/// <summary>
|
2022-02-15 15:01:45 +11:00
|
|
|
/// How much time we've accumulated until next teleport.
|
2021-11-11 02:15:23 +13:00
|
|
|
/// </summary>
|
2022-02-15 15:01:45 +11:00
|
|
|
[ViewVariables]
|
2022-04-23 22:27:19 -04:00
|
|
|
[DataField("accumulator")]
|
2022-02-15 15:01:45 +11:00
|
|
|
public float Accumulator = 0f;
|
2021-11-11 02:15:23 +13:00
|
|
|
|
2022-02-15 15:01:45 +11:00
|
|
|
[ViewVariables]
|
|
|
|
|
public CargoTelepadState CurrentState = CargoTelepadState.Unpowered;
|
2020-12-18 20:14:26 -06:00
|
|
|
|
2022-02-15 15:01:45 +11:00
|
|
|
[DataField("teleportSound")] public SoundSpecifier TeleportSound = new SoundPathSpecifier("/Audio/Machines/phasein.ogg");
|
2020-12-18 20:14:26 -06:00
|
|
|
|
2021-11-11 02:15:23 +13:00
|
|
|
/// <summary>
|
2022-02-15 15:01:45 +11:00
|
|
|
/// The paper-type prototype to spawn with the order information.
|
2021-11-11 02:15:23 +13:00
|
|
|
/// </summary>
|
2022-02-15 15:01:45 +11:00
|
|
|
[DataField("printerOutput", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
|
|
|
public string PrinterOutput = "Paper";
|
2022-05-12 03:24:24 -07:00
|
|
|
|
|
|
|
|
[DataField("receiverPort", customTypeSerializer: typeof(PrototypeIdSerializer<ReceiverPortPrototype>))]
|
|
|
|
|
public string ReceiverPort = "OrderReceiver";
|
2020-12-18 20:14:26 -06:00
|
|
|
}
|
|
|
|
|
}
|