mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* SubscribeLocalEvent attr * reorder * Entity<T> * Accumulator is kill * naming consistency * combining if statements * database is one word * needed * This is called in SetData anyway * small things * This need to be before * AutoPausedField * Fixed unpowered telepad still working (oops) * delay after repowered * Update CargoSystem.Telepad.cs --------- Co-authored-by: Pok245 <113675512+Pok27@users.noreply.github.com>
44 lines
1.4 KiB
C#
44 lines
1.4 KiB
C#
using Content.Shared.DeviceLinking;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
|
|
|
|
namespace Content.Shared.Cargo.Components;
|
|
|
|
/// <summary>
|
|
/// Handles teleporting in requested cargo after the specified delay.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, Access(typeof(SharedCargoSystem)), AutoGenerateComponentPause]
|
|
public sealed partial class CargoTelepadComponent : Component
|
|
{
|
|
[DataField]
|
|
public List<CargoOrderData> CurrentOrders = new();
|
|
|
|
/// <summary>
|
|
/// The delay between each teleport in seconds
|
|
/// </summary>
|
|
[DataField]
|
|
public TimeSpan Delay = TimeSpan.FromSeconds(5);
|
|
|
|
/// <summary>
|
|
/// The next time the teleporter can teleport.
|
|
/// </summary>
|
|
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField]
|
|
public TimeSpan NextTeleport;
|
|
|
|
[DataField]
|
|
public CargoTelepadState CurrentState = CargoTelepadState.Unpowered;
|
|
|
|
[DataField]
|
|
public SoundSpecifier TeleportSound = new SoundPathSpecifier("/Audio/Machines/phasein.ogg");
|
|
|
|
/// <summary>
|
|
/// The paper-type prototype to spawn with the order information.
|
|
/// </summary>
|
|
[DataField]
|
|
public EntProtoId PrinterOutput = "PaperCargoInvoice";
|
|
|
|
[DataField]
|
|
public ProtoId<SinkPortPrototype> ReceiverPort = "OrderReceiver";
|
|
}
|