Files
tbd-station-14/Content.Shared/Teleportation/Components/PortalComponent.cs
Kara c821ca71aa Portals & hand teleporter (#13266)
* basic system with portals & linked ents

* hand tele sprites, no impl

* hand tele and teleportation works

* fancy it up

* oog

* special case projectiles

* predict portal-to-portal teleportation

* this stuff

* check nullspace

* sloth

* give to rd instead

* i guess this can probably happen

* docs
2023-01-02 19:58:25 -06:00

32 lines
1.2 KiB
C#

using Robust.Shared.Audio;
using Robust.Shared.GameStates;
namespace Content.Shared.Teleportation.Components;
/// <summary>
/// Marks an entity as being a 'portal' which teleports entities sent through it to linked entities.
/// Relies on <see cref="LinkedEntityComponent"/> being set up.
/// </summary>
[RegisterComponent, NetworkedComponent]
public sealed class PortalComponent : Component
{
/// <summary>
/// Sound played on arriving to this portal, centered on the destination.
/// The arrival sound of the entered portal will play if the destination is not a portal.
/// </summary>
[DataField("arrivalSound")]
public SoundSpecifier ArrivalSound = new SoundPathSpecifier("/Audio/Effects/teleport_arrival.ogg");
/// <summary>
/// Sound played on departing from this portal, centered on the original portal.
/// </summary>
[DataField("departureSound")]
public SoundSpecifier DepartureSound = new SoundPathSpecifier("/Audio/Effects/teleport_departure.ogg");
/// <summary>
/// If no portals are linked, the subject will be teleported a random distance at maximum this far away.
/// </summary>
[DataField("maxRandomRadius")]
public float MaxRandomRadius = 10.0f;
}