diff --git a/Content.Server/ParticleAccelerator/Components/ParticleAcceleratorControlBoxComponent.cs b/Content.Server/ParticleAccelerator/Components/ParticleAcceleratorControlBoxComponent.cs index 4d0eb6dfb0..d3ea1553ed 100644 --- a/Content.Server/ParticleAccelerator/Components/ParticleAcceleratorControlBoxComponent.cs +++ b/Content.Server/ParticleAccelerator/Components/ParticleAcceleratorControlBoxComponent.cs @@ -191,6 +191,9 @@ namespace Content.Server.ParticleAccelerator.Components protected override void OnRemove() { + _fireCancelTokenSrc?.Cancel(); + _fireCancelTokenSrc = null; + Master = null; foreach (var part in AllParts()) { diff --git a/Content.Shared/Interaction/SharedInteractionSystem.cs b/Content.Shared/Interaction/SharedInteractionSystem.cs index 182b0ba84f..07edf947ef 100644 --- a/Content.Shared/Interaction/SharedInteractionSystem.cs +++ b/Content.Shared/Interaction/SharedInteractionSystem.cs @@ -119,9 +119,8 @@ namespace Content.Shared.Interaction /// private void HandleInteractInventorySlotEvent(InteractInventorySlotEvent msg, EntitySessionEventArgs args) { - var coords = Transform(msg.ItemUid).Coordinates; // client sanitization - if (!ValidateClientInput(args.SenderSession, coords, msg.ItemUid, out var user)) + if (!TryComp(msg.ItemUid, out TransformComponent? itemXform) || !ValidateClientInput(args.SenderSession, itemXform.Coordinates, msg.ItemUid, out var user)) { Logger.InfoS("system.interaction", $"Inventory interaction validation failed. Session={args.SenderSession}"); return; @@ -134,7 +133,7 @@ namespace Content.Shared.Interaction if (msg.AltInteract) // Use 'UserInteraction' function - behaves as if the user alt-clicked the item in the world. - UserInteraction(user.Value, coords, msg.ItemUid, msg.AltInteract); + UserInteraction(user.Value, itemXform.Coordinates, msg.ItemUid, msg.AltInteract); else // User used 'E'. We want to activate it, not simulate clicking on the item InteractionActivate(user.Value, msg.ItemUid);