]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix door access in mapping mode (#30030)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Fri, 19 Jul 2024 06:19:15 +0000 (16:19 +1000)
committerGitHub <noreply@github.com>
Fri, 19 Jul 2024 06:19:15 +0000 (16:19 +1000)
Fix shouldn't break anythingTM.

Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs
Content.Shared/Access/Systems/AccessReaderSystem.cs

index 402d005dd47539da4af8fe55389470507c8b782d..59b58c69338bae6d7acca534c5f8502c05881bc4 100644 (file)
@@ -423,11 +423,11 @@ public sealed class NetworkConfiguratorSystem : SharedNetworkConfiguratorSystem
         if (Delay(configurator))
             return;
 
-        if (!targetUid.HasValue || !configurator.ActiveDeviceLink.HasValue || !TryComp(userUid, out ActorComponent? actor) || !AccessCheck(targetUid.Value, userUid, configurator))
+        if (!targetUid.HasValue || !configurator.ActiveDeviceLink.HasValue || !AccessCheck(targetUid.Value, userUid, configurator))
             return;
 
 
-        _uiSystem.OpenUi(configuratorUid, NetworkConfiguratorUiKey.Link, actor.PlayerSession);
+        _uiSystem.OpenUi(configuratorUid, NetworkConfiguratorUiKey.Link, userUid);
         configurator.DeviceLinkTarget = targetUid;
 
 
index 5d1932a959c5a0f3dda38bf2da650a08ff1c8d6c..2e0737c6ab2075cbca25ecbe9de8fce66ec85913 100644 (file)
@@ -155,7 +155,12 @@ public sealed class AccessReaderSystem : EntitySystem
             return IsAllowedInternal(access, stationKeys, reader);
 
         if (!_containerSystem.TryGetContainer(target, reader.ContainerAccessProvider, out var container))
-            return Paused(target); // when mapping, containers with electronics arent spawned
+            return false;
+
+        // If entity is paused then always allow it at this point.
+        // Door electronics is kind of a mess but yeah, it should only be an unpaused ent interacting with it
+        if (Paused(target))
+            return true;
 
         foreach (var entity in container.ContainedEntities)
         {