]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Actual fix for lockers and deconstruction (#27431)
authorNemanja <98561806+EmoGarbage404@users.noreply.github.com>
Sun, 28 Apr 2024 05:26:55 +0000 (01:26 -0400)
committerGitHub <noreply@github.com>
Sun, 28 Apr 2024 05:26:55 +0000 (15:26 +1000)
actual actual locker construction fix

Content.Server/Construction/Conditions/Locked.cs

index fde704b161b5b4334d69e9758f46cbc6377623c5..0b8c9118dc78684d556a2bd66b3d13c9c4e2b643 100644 (file)
@@ -15,7 +15,7 @@ namespace Content.Server.Construction.Conditions
         public bool Condition(EntityUid uid, IEntityManager entityManager)
         {
             if (!entityManager.TryGetComponent(uid, out LockComponent? lockcomp))
-                return false;
+                return true;
 
             return lockcomp.Locked == IsLocked;
         }
@@ -25,7 +25,8 @@ namespace Content.Server.Construction.Conditions
             var entMan = IoCManager.Resolve<IEntityManager>();
             var entity = args.Examined;
 
-            if (!entMan.TryGetComponent(entity, out LockComponent? lockcomp)) return false;
+            if (!entMan.TryGetComponent(entity, out LockComponent? lockcomp))
+                return true;
 
             switch (IsLocked)
             {