CatStation/Content.Shared/StationTeleporter/Components/StationTeleporterComponent.cs
TheShuEd bdbc143e7f
Stationary teleporters (#32134)
* sprite, start work on systems

* Woah! Its work!

* Show gateways! Yay!

* Update ring.png

* Update portal.yml

* bububui

* Fuck UI

* draw lines!

* clear old links lines

* UI button work now!

* we can cut links via UI now!

* yay! linking via UI

* comfortable linking

* Update hand_teleporter.yml

* ambience, linked entities events

* nice connect and disconnect sounds!

* unpowering and memory

* power fix

* chip added

* chip linking & auto linking

* chip examined

* auto linked chips&gates variants

* Update meta.json

* Update computers.yml

* syndicate gateway console, portal coloring, realtime UI update

* QoL update

* Circuitboards

* Update StationGatewayNavMapControl.cs

* optimize Draw(), add Filled console variant

* documentation

* mass renaming bro

* resprited

* resprite agani

* Update tags.yml

* Update Resources/Prototypes/Entities/Structures/Machines/station_teleporter.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Structures/Machines/Computers/computers.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Objects/Devices/teleporters_chips.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Resources/Prototypes/Entities/Objects/Devices/Circuitboards/computer.yml

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Server/StationTeleporter/Components/TeleporterChipComponent.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* Update Content.Shared/StationTeleporter/StationTeleporterComponent.cs

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>

* renaming renaming

* sharedization

* UI fix

* Data simplify

* remove autodeletion

* PostWallDrawingAction

* Update TeleporterChipComponent.cs

* fix lines offset

* labeler renaming, rebound restiction removed

* prevent link popup and sound spamming

* auto linking refactor

* RD handheld teleporter integration

* fix randomteleport bug

* Update hand_teleporter.yml

* Update SharedStationTeleporterSystem.cs

* Update SharedStationTeleporterSystem.UI.cs

* some clean up

* first smol review pass

* and that

* review pass 2

* Update station_teleporter.yml

* review pass 3

* review pass 4

* finally

* update protos

* another clean up

* fix bugs

* add to players

* remove unnecesary update loop lol.

* Update computers.yml

* fieldrance review apply

* Kazne resprite

---------

Co-authored-by: slarticodefast <161409025+slarticodefast@users.noreply.github.com>
Co-authored-by: chromiumboy <50505512+chromiumboy@users.noreply.github.com>
2026-07-28 11:39:26 +00:00

54 lines
1.8 KiB
C#

using Robust.Shared.Audio;
namespace Content.Shared.StationTeleporter.Components;
/// <summary>
/// Allows an entity to be displayed and managed using <see cref="StationTeleporterConsoleComponent"/>.
/// </summary>
[RegisterComponent]
[Access(typeof(SharedStationTeleporterSystem))]
public sealed partial class StationTeleporterComponent : Component
{
/// <summary>
/// When initialized, the chip from this teleporter will be automatically generated inside all consoles with the same AutoLinkKey
/// </summary>
[DataField]
public string? AutoLinkKey;
/// <summary>
/// The sound that plays at the portal when it connects to something
/// </summary>
[DataField]
public SoundSpecifier LinkSound = new SoundPathSpecifier("/Audio/Effects/Lightning/lightningbolt.ogg")
{
Params = AudioParams.Default.WithVariation(0.05f),
};
/// <summary>
/// The sound played at the portal when it disconnects
/// </summary>
[DataField]
public SoundSpecifier UnlinkSound = new SoundPathSpecifier("/Audio/Effects/gateway_off.ogg")
{
Params = AudioParams.Default.WithVariation(0.05f),
};
/// <summary>
/// The last link that the portal will attempt to connect to after power up.
/// </summary>
[DataField]
public EntityUid? LastLink;
/// <summary>
/// Used for coloring from AppearanceChanged
/// </summary>
[DataField]
public string? PortalLayerMap;
/// <summary>
/// Color applied to the portal effect once this teleporter is linked. Set by the console that links it
/// (e.g. Syndicate consoles use a red tint) and picked up by <see cref="SharedStationTeleporterSystem"/> when the link succeeds.
/// </summary>
[DataField]
public Color PortalColor = Color.White;
}