From: beck-thompson <107373427+beck-thompson@users.noreply.github.com> Date: Mon, 22 Sep 2025 06:40:13 +0000 (-0700) Subject: Shuttle UI now properly goes into pilot mode only when using the UI (#40491) X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=a26bafacb1b2d81b40a19274edda40aca14cb696;p=space-station-14.git Shuttle UI now properly goes into pilot mode only when using the UI (#40491) Shuttle UI bug fix --- diff --git a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs index cbd6abe9f5..126c4f963c 100644 --- a/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs +++ b/Content.Server/Shuttles/Systems/ShuttleConsoleSystem.cs @@ -56,7 +56,7 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem SubscribeLocalEvent(OnConsoleShutdown); SubscribeLocalEvent(OnConsolePowerChange); SubscribeLocalEvent(OnConsoleAnchorChange); - SubscribeLocalEvent(OnConsoleUIOpenAttempt); + SubscribeLocalEvent(OnConsoleUIOpenAttempt); Subs.BuiEvents(ShuttleConsoleUiKey.Key, subs => { subs.Event(OnBeaconFTLMessage); @@ -150,10 +150,9 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem } private void OnConsoleUIOpenAttempt(EntityUid uid, ShuttleConsoleComponent component, - ActivatableUIOpenAttemptEvent args) + AfterActivatableUIOpenEvent args) { - if (!TryPilot(args.User, uid)) - args.Cancel(); + TryPilot(args.User, uid); } private void OnConsoleAnchorChange(EntityUid uid, ShuttleConsoleComponent component, diff --git a/Content.Shared/UserInterface/ActivatableUIEvents.cs b/Content.Shared/UserInterface/ActivatableUIEvents.cs index 338673a3ca..ef2a7b1b9f 100644 --- a/Content.Shared/UserInterface/ActivatableUIEvents.cs +++ b/Content.Shared/UserInterface/ActivatableUIEvents.cs @@ -1,6 +1,9 @@ -using Robust.Shared.Player; - namespace Content.Shared.UserInterface; + +/// +/// This is raised BEFORE opening a UI! Do not listen and then open / do something use +/// for that. +/// public sealed class ActivatableUIOpenAttemptEvent : CancellableEntityEventArgs { public EntityUid User { get; }