From 569f30b721e36ecf735ca5749a27f20454a12596 Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Thu, 23 Mar 2023 16:10:49 +1100 Subject: [PATCH] Cargo shuttle changes (#14363) --- .../CargoShuttleConsoleBoundUserInterface.cs | 20 +- Content.Client/Cargo/UI/CargoShuttleMenu.xaml | 6 - .../Cargo/UI/CargoShuttleMenu.xaml.cs | 62 +--- Content.Client/Shuttles/UI/RadarControl.cs | 16 +- Content.Server/Alert/Click/StopPiloting.cs | 2 +- .../Cargo/Systems/CargoSystem.Orders.cs | 19 +- .../Cargo/Systems/CargoSystem.Shuttle.cs | 289 +++++++----------- .../Components/EmergencyDockComponent.cs | 7 - .../Shuttles/Components/FTLComponent.cs | 8 + .../Components/PriorityDockComponent.cs | 18 ++ .../Shuttles/Components/ShuttleComponent.cs | 2 - Content.Server/Shuttles/DockCommand.cs | 12 +- Content.Server/Shuttles/Events/FTLTagEvent.cs | 7 + .../Systems/DockingSystem.AutoDock.cs | 14 +- .../Shuttles/Systems/DockingSystem.cs | 126 ++++---- .../Shuttles/Systems/ShuttleConsoleSystem.cs | 120 +++++--- .../Systems/ShuttleSystem.EmergencyConsole.cs | 2 +- .../Systems/ShuttleSystem.EmergencyShuttle.cs | 125 +------- .../Systems/ShuttleSystem.FasterThanLight.cs | 197 ++++++++++-- ...goShuttleConsoleBoundUserInterfaceState.cs | 16 - .../Cargo/Components/CargoShuttleComponent.cs | 15 - .../Cargo/Events/CargoCallShuttleMessage.cs | 12 - .../Cargo/Events/CargoRecallShuttleMessage.cs | 12 - .../Systems/SharedRadarConsoleSystem.cs | 3 + .../Structures/Doors/Airlocks/access.yml | 19 +- Resources/Prototypes/tags.yml | 6 + 26 files changed, 515 insertions(+), 620 deletions(-) delete mode 100644 Content.Server/Shuttles/Components/EmergencyDockComponent.cs create mode 100644 Content.Server/Shuttles/Components/PriorityDockComponent.cs create mode 100644 Content.Server/Shuttles/Events/FTLTagEvent.cs delete mode 100644 Content.Shared/Cargo/Events/CargoCallShuttleMessage.cs delete mode 100644 Content.Shared/Cargo/Events/CargoRecallShuttleMessage.cs diff --git a/Content.Client/Cargo/BUI/CargoShuttleConsoleBoundUserInterface.cs b/Content.Client/Cargo/BUI/CargoShuttleConsoleBoundUserInterface.cs index 86b583206e..f1f102985e 100644 --- a/Content.Client/Cargo/BUI/CargoShuttleConsoleBoundUserInterface.cs +++ b/Content.Client/Cargo/BUI/CargoShuttleConsoleBoundUserInterface.cs @@ -1,12 +1,12 @@ using Content.Client.Cargo.UI; using Content.Shared.Cargo.BUI; -using Content.Shared.Cargo.Events; +using JetBrains.Annotations; using Robust.Client.GameObjects; using Robust.Shared.Prototypes; -using Robust.Shared.Timing; namespace Content.Client.Cargo.BUI; +[UsedImplicitly] public sealed class CargoShuttleConsoleBoundUserInterface : BoundUserInterface { private CargoShuttleMenu? _menu; @@ -21,9 +21,7 @@ public sealed class CargoShuttleConsoleBoundUserInterface : BoundUserInterface if (collection == null) return; - _menu = new CargoShuttleMenu(collection.Resolve(), collection.Resolve(), collection.Resolve().GetEntitySystem()); - _menu.ShuttleCallRequested += OnShuttleCall; - _menu.ShuttleRecallRequested += OnShuttleRecall; + _menu = new CargoShuttleMenu(collection.Resolve(), collection.Resolve().GetEntitySystem()); _menu.OnClose += Close; _menu.OpenCentered(); @@ -38,24 +36,12 @@ public sealed class CargoShuttleConsoleBoundUserInterface : BoundUserInterface } } - private void OnShuttleRecall() - { - SendMessage(new CargoRecallShuttleMessage()); - } - - private void OnShuttleCall() - { - SendMessage(new CargoCallShuttleMessage()); - } - protected override void UpdateState(BoundUserInterfaceState state) { base.UpdateState(state); if (state is not CargoShuttleConsoleBoundUserInterfaceState cargoState) return; _menu?.SetAccountName(cargoState.AccountName); _menu?.SetShuttleName(cargoState.ShuttleName); - _menu?.SetShuttleETA(cargoState.ShuttleETA); _menu?.SetOrders(cargoState.Orders); - _menu?.SetCanRecall(cargoState.CanRecall); } } diff --git a/Content.Client/Cargo/UI/CargoShuttleMenu.xaml b/Content.Client/Cargo/UI/CargoShuttleMenu.xaml index f789197fa8..c070b90823 100644 --- a/Content.Client/Cargo/UI/CargoShuttleMenu.xaml +++ b/Content.Client/Cargo/UI/CargoShuttleMenu.xaml @@ -22,12 +22,6 @@