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

@@ -3,7 +3,6 @@ using Content.Server.Explosion.EntitySystems;
using Content.Server.Resist;
using Content.Server.Station.Components;
using Content.Server.Storage.Components;
using Content.Server.Tools.Systems;
using Content.Shared.Access.Components;
using Content.Shared.Coordinates;
using Content.Shared.DoAfter;
@@ -11,6 +10,7 @@ using Content.Shared.Lock;
using Content.Shared.Mind.Components;
using Content.Shared.Storage.Components;
using Content.Shared.Storage.EntitySystems;
using Content.Shared.Tools.Systems;
using Robust.Shared.Random;
using Robust.Shared.Timing;
@@ -327,13 +327,12 @@ public sealed class BluespaceLockerSystem : EntitySystem
}
else
{
if (target.Value.storageComponent.IsWeldedShut)
if (_weldableSystem.IsWelded(target.Value.uid))
{
// It gets bluespaced open...
_weldableSystem.ForceWeldedState(target.Value.uid, false);
if (target.Value.storageComponent.IsWeldedShut)
target.Value.storageComponent.IsWeldedShut = false;
_weldableSystem.SetWeldedState(target.Value.uid, false);
}
LockComponent? lockComponent = null;
if (Resolve(target.Value.uid, ref lockComponent, false) && lockComponent.Locked)
_lockSystem.Unlock(target.Value.uid, target.Value.uid, lockComponent);