From a8214c05d44cd4e355d10f4a0526a50e0a1be99a Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Thu, 23 Mar 2023 16:38:46 +1100 Subject: [PATCH] Add tagged airlock for arrivals (#14785) --- Content.Server/Shuttles/Systems/ArrivalsSystem.cs | 13 +++++++++++++ .../Entities/Structures/Doors/Airlocks/access.yml | 8 ++++++++ Resources/Prototypes/tags.yml | 3 +++ 3 files changed, 24 insertions(+) diff --git a/Content.Server/Shuttles/Systems/ArrivalsSystem.cs b/Content.Server/Shuttles/Systems/ArrivalsSystem.cs index 7f6c8057c4..b05be7cd0a 100644 --- a/Content.Server/Shuttles/Systems/ArrivalsSystem.cs +++ b/Content.Server/Shuttles/Systems/ArrivalsSystem.cs @@ -53,8 +53,11 @@ public sealed class ArrivalsSystem : EntitySystem SubscribeLocalEvent(OnPlayerSpawn, before: new []{typeof(SpawnPointSystem)}); SubscribeLocalEvent(OnArrivalsStartup); + SubscribeLocalEvent(OnShuttleStartup); SubscribeLocalEvent(OnShuttleUnpaused); + SubscribeLocalEvent(OnShuttleTag); + SubscribeLocalEvent(OnStationInit); SubscribeLocalEvent(OnRoundStarting); SubscribeLocalEvent(OnArrivalsFTL); @@ -67,6 +70,16 @@ public sealed class ArrivalsSystem : EntitySystem _console.RegisterCommand("arrivals", ArrivalsCommand, ArrivalsCompletion); } + private void OnShuttleTag(EntityUid uid, ArrivalsShuttleComponent component, ref FTLTagEvent args) + { + if (args.Handled) + return; + + // Just saves mappers forgetting. (v2 boogaloo) + args.Handled = true; + args.Tag = "DockArrivals"; + } + private CompletionResult ArrivalsCompletion(IConsoleShell shell, string[] args) { if (args.Length != 1) diff --git a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/access.yml b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/access.yml index 4c62f0d77c..47ea733731 100644 --- a/Resources/Prototypes/Entities/Structures/Doors/Airlocks/access.yml +++ b/Resources/Prototypes/Entities/Structures/Doors/Airlocks/access.yml @@ -732,6 +732,14 @@ - type: AccessReader access: [["External"]] +- type: entity + parent: AirlockGlassShuttle + id: AirlockExternalGlassShuttleArrivals + suffix: External, Glass, Docking + components: + - type: PriorityDock + tag: DockArrivals + #HighSecDoors - type: entity parent: HighSecDoor diff --git a/Resources/Prototypes/tags.yml b/Resources/Prototypes/tags.yml index 60c0c78f7a..a96535136d 100644 --- a/Resources/Prototypes/tags.yml +++ b/Resources/Prototypes/tags.yml @@ -182,6 +182,9 @@ - type: Tag id: DiscreteHealthAnalyzer #So construction recipes don't eat medical PDAs +- type: Tag + id: DockArrivals + - type: Tag id: DockCargo -- 2.51.2