Shuttle UI now properly goes into pilot mode only when using the UI (#40491)
Shuttle UI bug fix
This commit is contained in:
@@ -56,7 +56,7 @@ public sealed partial class ShuttleConsoleSystem : SharedShuttleConsoleSystem
|
||||
SubscribeLocalEvent<ShuttleConsoleComponent, ComponentShutdown>(OnConsoleShutdown);
|
||||
SubscribeLocalEvent<ShuttleConsoleComponent, PowerChangedEvent>(OnConsolePowerChange);
|
||||
SubscribeLocalEvent<ShuttleConsoleComponent, AnchorStateChangedEvent>(OnConsoleAnchorChange);
|
||||
SubscribeLocalEvent<ShuttleConsoleComponent, ActivatableUIOpenAttemptEvent>(OnConsoleUIOpenAttempt);
|
||||
SubscribeLocalEvent<ShuttleConsoleComponent, AfterActivatableUIOpenEvent>(OnConsoleUIOpenAttempt);
|
||||
Subs.BuiEvents<ShuttleConsoleComponent>(ShuttleConsoleUiKey.Key, subs =>
|
||||
{
|
||||
subs.Event<ShuttleConsoleFTLBeaconMessage>(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,
|
||||
|
||||
Reference in New Issue
Block a user