Weldable cleanup (#19809)

This commit is contained in:
metalgearsloth
2023-09-05 00:07:01 +10:00
committed by GitHub
parent 88454b046a
commit db1ff07821
24 changed files with 159 additions and 210 deletions

View File

@@ -15,6 +15,7 @@ using Content.Shared.Hands.Components;
using Content.Shared.Inventory;
using Content.Shared.Mobs.Systems;
using Content.Shared.Nutrition.Components;
using Content.Shared.Tools.Systems;
using Content.Shared.Weapons.Melee;
using Content.Shared.Weapons.Ranged.Components;
using Content.Shared.Weapons.Ranged.Events;
@@ -42,6 +43,7 @@ public sealed class NPCUtilitySystem : EntitySystem
[Dependency] private readonly PuddleSystem _puddle = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly SolutionContainerSystem _solutions = default!;
[Dependency] private readonly WeldableSystem _weldable = default!;
private EntityQuery<TransformComponent> _xformQuery;
@@ -195,7 +197,7 @@ public sealed class NPCUtilitySystem : EntitySystem
{
if (TryComp<EntityStorageComponent>(container.Owner, out var storageComponent))
{
if (storageComponent is { IsWeldedShut: true, Open: false })
if (storageComponent is { Open: false } && _weldable.IsWelded(container.Owner))
{
return 0.0f;
}