Files
tbd-station-14/Content.Server/Cargo/Components/CargoTelepadComponent.cs
Moony fada213a22 Implements item pricing, and piracy. (#8548)
* Start implementing item pricing.

* Flesh out prices a bit, add the appraisal tool.

* Add prices to more things.

* YARRRRRRR

* gives pirates an appraisal tool in their pocket.

* Makes the various traitor objectives valuable. Also nerfs the price of a living person, so it's easier to bargain for them.

* Address reviews.

* Address reviews.
2022-06-03 10:56:11 -05:00

45 lines
1.6 KiB
C#

using Content.Server.Cargo.Systems;
using Content.Shared.Cargo;
using Content.Shared.Cargo.Components;
using Content.Shared.MachineLinking;
using Content.Shared.Sound;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
namespace Content.Server.Cargo.Components
{
/// <summary>
/// Handles teleporting in requested cargo after the specified delay.
/// </summary>
[RegisterComponent, Friend(typeof(CargoSystem))]
public sealed class CargoTelepadComponent : SharedCargoTelepadComponent
{
[DataField("delay")]
public float Delay = 20f;
/// <summary>
/// How much time we've accumulated until next teleport.
/// </summary>
[ViewVariables]
[DataField("accumulator")]
public float Accumulator = 0f;
[ViewVariables]
public readonly Stack<CargoOrderData> TeleportQueue = new();
[ViewVariables]
public CargoTelepadState CurrentState = CargoTelepadState.Unpowered;
[DataField("teleportSound")] public SoundSpecifier TeleportSound = new SoundPathSpecifier("/Audio/Machines/phasein.ogg");
/// <summary>
/// The paper-type prototype to spawn with the order information.
/// </summary>
[DataField("printerOutput", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
public string PrinterOutput = "Paper";
[DataField("receiverPort", customTypeSerializer: typeof(PrototypeIdSerializer<ReceiverPortPrototype>))]
public string ReceiverPort = "OrderReceiver";
}
}