Force-prying crit borgs opens borg panel (#42460)

yeah
This commit is contained in:
ScarKy0
2026-01-22 10:44:31 +01:00
committed by GitHub
parent 1bfe7a0d11
commit 1a0b108bdd
3 changed files with 16 additions and 2 deletions

View 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;
}

View 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)

View File

@@ -247,6 +247,7 @@
flatReductions:
Heat: 10 # capable of touching light bulbs and stoves without feeling pain!
- type: BypassLock
openWiresPanel: true
- type: BypassLockRequiresMobState
requiredMobState:
- Critical