Fixed canister being unlocked and opening the Ui at the same time when left-clicking it (#17750)
This commit is contained in:
@@ -38,7 +38,7 @@ public sealed class GasCanisterSystem : EntitySystem
|
||||
|
||||
SubscribeLocalEvent<GasCanisterComponent, ComponentStartup>(OnCanisterStartup);
|
||||
SubscribeLocalEvent<GasCanisterComponent, AtmosDeviceUpdateEvent>(OnCanisterUpdated);
|
||||
SubscribeLocalEvent<GasCanisterComponent, ActivateInWorldEvent>(OnCanisterActivate);
|
||||
SubscribeLocalEvent<GasCanisterComponent, ActivateInWorldEvent>(OnCanisterActivate, after: new[] { typeof(LockSystem) });
|
||||
SubscribeLocalEvent<GasCanisterComponent, InteractHandEvent>(OnCanisterInteractHand);
|
||||
SubscribeLocalEvent<GasCanisterComponent, InteractUsingEvent>(OnCanisterInteractUsing);
|
||||
SubscribeLocalEvent<GasCanisterComponent, EntInsertedIntoContainerMessage>(OnCanisterContainerInserted);
|
||||
@@ -230,6 +230,11 @@ public sealed class GasCanisterSystem : EntitySystem
|
||||
if (CheckLocked(uid, component, args.User))
|
||||
return;
|
||||
|
||||
// Needs to be here so the locked check still happens if the canister
|
||||
// is locked and you don't have permissions
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
_ui.TryOpen(uid, GasCanisterUiKey.Key, actor.PlayerSession);
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user