]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Force-prying crit borgs opens borg panel (#42460)
authorScarKy0 <106310278+ScarKy0@users.noreply.github.com>
Thu, 22 Jan 2026 09:44:31 +0000 (10:44 +0100)
committerGitHub <noreply@github.com>
Thu, 22 Jan 2026 09:44:31 +0000 (09:44 +0000)
yeah

Content.Shared/Lock/BypassLock/Components/BypassLockComponent.cs
Content.Shared/Lock/BypassLock/Systems/BypassLockSystem.cs
Resources/Prototypes/Entities/Mobs/Cyborgs/base_borg_chassis.yml

index 38c6275d86b9c9e0430588e3f5a30566c657e04b..377c12cc6d9992ec77235390cf076218e57c33de 100644 (file)
@@ -21,5 +21,11 @@ public sealed partial class BypassLockComponent : Component
     /// Amount of time in seconds it takes to bypass
     /// </summary>
     [DataField]
-    public TimeSpan BypassDelay = TimeSpan.FromSeconds(5f);
+    public TimeSpan BypassDelay = TimeSpan.FromSeconds(4f);
+
+    /// <summary>
+    /// Whether the wirepanel should be opened as well, if one exists.
+    /// </summary>
+    [DataField]
+    public bool OpenWiresPanel = false;
 }
index 1dcc4ee74a2cfde431dcf903cafd343ffdc3a20e..406e898c5999a1b67ef016bd56335f4e63582c02 100644 (file)
@@ -6,6 +6,7 @@ using Content.Shared.Lock.BypassLock.Components;
 using Content.Shared.Tools;
 using Content.Shared.Tools.Systems;
 using Content.Shared.Verbs;
+using Content.Shared.Wires;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Serialization;
 
@@ -16,6 +17,7 @@ public sealed partial class BypassLockSystem : EntitySystem
     [Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
     [Dependency] private readonly LockSystem _lock = default!;
     [Dependency] private readonly SharedToolSystem _tool = default!;
+    [Dependency] private readonly SharedWiresSystem _wires = default!;
 
     public override void Initialize()
     {
@@ -32,7 +34,7 @@ public sealed partial class BypassLockSystem : EntitySystem
     {
         if (target.Owner == args.User)
             return;
-        
+
         if (!_tool.HasQuality(args.Used, target.Comp.BypassingTool)
             || !_lock.IsLocked(target.Owner))
             return;
@@ -70,6 +72,11 @@ public sealed partial class BypassLockSystem : EntitySystem
             return;
 
         _lock.Unlock(target, args.User, target.Comp);
+
+        if (TryComp<WiresPanelComponent>(target, out var wiresPanel) &&
+            TryComp<BypassLockComponent>(target, out var bypassLock) && bypassLock.OpenWiresPanel)
+            _wires.TogglePanel(target, wiresPanel, true, args.User);
+
     }
 
     private void OnGetVerb(Entity<BypassLockComponent> target, ref GetVerbsEvent<InteractionVerb> args)
index ed61df6eff8792ff18a2f3204e2a64b745dec9cd..b20116333fbb75253830dc3d6dec454334e586bd 100644 (file)
       flatReductions:
         Heat: 10 # capable of touching light bulbs and stoves without feeling pain!
   - type: BypassLock
+    openWiresPanel: true
   - type: BypassLockRequiresMobState
     requiredMobState:
     - Critical