]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Fix misprediction of emergency access (#25973)
authornikthechampiongr <32041239+nikthechampiongr@users.noreply.github.com>
Mon, 11 Mar 2024 01:50:09 +0000 (03:50 +0200)
committerGitHub <noreply@github.com>
Mon, 11 Mar 2024 01:50:09 +0000 (12:50 +1100)
The EmergencyAccess bool on the AirlockComponent would not get synced to the client

Content.Shared/Doors/Components/AirlockComponent.cs
Content.Shared/Doors/Systems/SharedAirlockSystem.cs

index dd8241c64ec7de3fa431ab91ece1492f80bf1c8d..b2fa7574f76f51cb0e7d4ae595287e3c1647b6c5 100644 (file)
@@ -21,7 +21,7 @@ public sealed partial class AirlockComponent : Component
     public bool Safety = true;
 
     [ViewVariables(VVAccess.ReadWrite)]
-    [DataField]
+    [DataField, AutoNetworkedField]
     public bool EmergencyAccess = false;
 
     /// <summary>
index a3172bb8c3ac28a84c40a32271742d77b82eef56..5a6d45d9ec0b08b3f4456cbfe6f7872d711bc3d2 100644 (file)
@@ -126,6 +126,7 @@ public abstract class SharedAirlockSystem : EntitySystem
     public void ToggleEmergencyAccess(EntityUid uid, AirlockComponent component)
     {
         component.EmergencyAccess = !component.EmergencyAccess;
+        Dirty(uid, component); // This only runs on the server apparently so we need this.
         UpdateEmergencyLightStatus(uid, component);
     }