Hand teleporter / portal tweaks (#13305)

This commit is contained in:
Kara
2023-01-03 01:53:16 -06:00
committed by GitHub
parent ab07944af8
commit 5eacde3da7
3 changed files with 91 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
using Content.Shared.Audio;
using System.Threading;
using Content.Shared.Audio;
using Robust.Shared.Audio;
using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
@@ -33,4 +34,22 @@ public sealed class HandTeleporterComponent : Component
[DataField("clearPortalsSound")]
public SoundSpecifier ClearPortalsSound = new SoundPathSpecifier("/Audio/Machines/button.ogg");
/// <summary>
/// Delay for creating the portals in seconds.
/// </summary>
[DataField("portalCreationDelay")]
public float PortalCreationDelay = 2.5f;
public CancellationTokenSource? CancelToken = null;
}
/// <summary>
/// Raised on doafter success for creating a portal.
/// </summary>
public record HandTeleporterSuccessEvent(EntityUid User);
/// <summary>
/// Raised on doafter cancel for creating a portal.
/// </summary>
public record HandTeleporterCancelledEvent;