mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
* 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>
60 lines
2.1 KiB
C#
60 lines
2.1 KiB
C#
using Content.Shared.DoAfter;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.GameStates;
|
|
using Robust.Shared.Prototypes;
|
|
using Robust.Shared.Serialization;
|
|
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
|
|
|
|
namespace Content.Shared.Teleportation.Components;
|
|
|
|
/// <summary>
|
|
/// Creates portals. If two are created, both are linked together--otherwise the first teleports randomly.
|
|
/// Using it with both portals active deactivates both.
|
|
/// </summary>
|
|
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
|
public sealed partial class HandTeleporterComponent : Component
|
|
{
|
|
[ViewVariables, DataField, AutoNetworkedField]
|
|
public EntityUid? FirstPortal = null;
|
|
|
|
[ViewVariables, DataField, AutoNetworkedField]
|
|
public EntityUid? SecondPortal = null;
|
|
|
|
/// <summary>
|
|
/// Should the portals be able to be placed across grids?
|
|
/// </summary>
|
|
[DataField]
|
|
public bool AllowPortalsOnDifferentGrids;
|
|
|
|
/// <summary>
|
|
/// Should the portals work across maps?
|
|
/// </summary>
|
|
[DataField]
|
|
public bool AllowPortalsOnDifferentMaps;
|
|
|
|
[DataField("firstPortalPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
public string FirstPortalPrototype = "PortalRed";
|
|
|
|
[DataField("secondPortalPrototype", customTypeSerializer: typeof(PrototypeIdSerializer<EntityPrototype>))]
|
|
public string SecondPortalPrototype = "PortalBlue";
|
|
|
|
[DataField("newPortalSound")] public SoundSpecifier NewPortalSound =
|
|
new SoundPathSpecifier("/Audio/Machines/high_tech_confirm.ogg")
|
|
{
|
|
Params = AudioParams.Default.AddVolume(-2f)
|
|
};
|
|
|
|
[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 = 1.0f;
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed partial class TeleporterDoAfterEvent : SimpleDoAfterEvent
|
|
{
|
|
}
|