Files
tbd-station-14/Content.Shared/Teleportation/Components/PortalComponent.cs
metalgearsloth 816ee2e1ab Gateway destinations (#21040)
* Gateway generation

* Gateway stuff

* gatewehs

* mercenaries

* play area

* Range fixes and tweaks

* weh

* Gateway UI polish

* Lots of fixes

* Knock some items off

* Fix dungeon spawning

Realistically we should probably be using a salvage job.

* wahwah

* wehvs

* expression

* weh

* eee

* a

* a

* WEH

* frfr

* Gatwey

* Fix gateway windows

* Fix gateway windows

* a

* a

* Better layer masking

* a

* a

* Noise fixes

* a

* Fix fractal calculations

* a

* More fixes

* Fixes

* Add layers back in

* Fixes

* namespaces and ftl

* Other TODO

* Fix distance

* Cleanup

* Fix test
2023-11-14 19:23:40 -07:00

57 lines
2.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 partial 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 = 7.0f;
/// <summary>
/// If false, this portal will fail to teleport and fizzle out if attempting to send an entity to a different map
/// </summary>
/// <remarks>
/// Shouldn't be able to teleport people to centcomm or the eshuttle from the station
/// </remarks>
[DataField("canTeleportToOtherMaps"), ViewVariables(VVAccess.ReadWrite)]
public bool CanTeleportToOtherMaps = false;
/// <summary>
/// Maximum distance that portals can teleport to, in all cases. Mostly this matters for linked portals.
/// Null means no restriction on distance.
/// </summary>
/// <remarks>
/// Obviously this should strictly be larger than <see cref="MaxRandomRadius"/> (or null)
/// </remarks>
[DataField("maxTeleportRadius")]
public float? MaxTeleportRadius;
/// <summary>
/// Should we teleport randomly if nothing is linked.
/// </summary>
[DataField, AutoNetworkedField]
public bool RandomTeleport = true;
}