From 68d0a41bb42ea44429749e7d1ca4f7d3deda004a Mon Sep 17 00:00:00 2001 From: Errant <35878406+Errant-4@users.noreply.github.com> Date: Fri, 9 May 2025 14:43:38 +0200 Subject: [PATCH] fix unremovable items used in construction (#37292) --- .../Construction/ConstructionSystem.Interactions.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/Construction/ConstructionSystem.Interactions.cs b/Content.Server/Construction/ConstructionSystem.Interactions.cs index 426ab6e80f..70a66c0ec7 100644 --- a/Content.Server/Construction/ConstructionSystem.Interactions.cs +++ b/Content.Server/Construction/ConstructionSystem.Interactions.cs @@ -8,8 +8,10 @@ using Content.Shared.Construction.EntitySystems; using Content.Shared.Construction.Steps; using Content.Shared.DoAfter; using Content.Shared.Interaction; +using Content.Shared.Interaction.Components; using Content.Shared.Prying.Systems; using Content.Shared.Radio.EntitySystems; +using Content.Shared.Stacks; using Content.Shared.Temperature; using Content.Shared.Tools.Systems; using Robust.Shared.Containers; @@ -274,6 +276,10 @@ namespace Content.Server.Construction if(!insertStep.EntityValid(insert, EntityManager, _factory)) return HandleResult.False; + // Unremovable items can't be inserted, unless they are a lingering stack + if(HasComp(insert) && (!TryComp(insert, out var comp) || !comp.Lingering)) + return HandleResult.False; + // If we're only testing whether this step would be handled by the given event, then we're done. if (validation) return HandleResult.Validated;