]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Add tagged airlock for arrivals (#14785)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Thu, 23 Mar 2023 05:38:46 +0000 (16:38 +1100)
committerGitHub <noreply@github.com>
Thu, 23 Mar 2023 05:38:46 +0000 (16:38 +1100)
Content.Server/Shuttles/Systems/ArrivalsSystem.cs
Resources/Prototypes/Entities/Structures/Doors/Airlocks/access.yml
Resources/Prototypes/tags.yml

index 7f6c8057c457a391571c2068845a42a24103d780..b05be7cd0a3beffa6fac802ad3189401c8746952 100644 (file)
@@ -53,8 +53,11 @@ public sealed class ArrivalsSystem : EntitySystem
 
         SubscribeLocalEvent<PlayerSpawningEvent>(OnPlayerSpawn, before: new []{typeof(SpawnPointSystem)});
         SubscribeLocalEvent<StationArrivalsComponent, ComponentStartup>(OnArrivalsStartup);
+
         SubscribeLocalEvent<ArrivalsShuttleComponent, ComponentStartup>(OnShuttleStartup);
         SubscribeLocalEvent<ArrivalsShuttleComponent, EntityUnpausedEvent>(OnShuttleUnpaused);
+        SubscribeLocalEvent<ArrivalsShuttleComponent, FTLTagEvent>(OnShuttleTag);
+
         SubscribeLocalEvent<StationInitializedEvent>(OnStationInit);
         SubscribeLocalEvent<RoundStartingEvent>(OnRoundStarting);
         SubscribeLocalEvent<ArrivalsShuttleComponent, FTLStartedEvent>(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)
index 4c62f0d77c72cff59b62ce2dd38326ddee4e0c93..47ea733731737d7cfc9a92d546902297285d0fc3 100644 (file)
     - type: AccessReader
       access: [["External"]]
 
+- type: entity
+  parent: AirlockGlassShuttle
+  id: AirlockExternalGlassShuttleArrivals
+  suffix: External, Glass, Docking
+  components:
+    - type: PriorityDock
+      tag: DockArrivals
+
 #HighSecDoors
 - type: entity
   parent: HighSecDoor
index 60c0c78f7a61f236bc2fd85e6d1b27d1490abbc5..a96535136dd405a09c15407231fd53a0bd2082de 100644 (file)
 - type: Tag
   id: DiscreteHealthAnalyzer #So construction recipes don't eat medical PDAs
 
+- type: Tag
+  id: DockArrivals
+
 - type: Tag
   id: DockCargo