Predict cryopods (#39385)

Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
This commit is contained in:
slarticodefast
2025-08-06 02:09:50 +02:00
committed by GitHub
parent 2a4f36422b
commit 63b2979e73
7 changed files with 253 additions and 283 deletions

View File

@@ -1,4 +1,3 @@
using Content.Server.Medical.Components;
using Content.Server.Wires;
using Content.Shared.Medical.Cryogenics;
using Content.Shared.Wires;
@@ -8,7 +7,7 @@ namespace Content.Server.Medical;
/// <summary>
/// Causes a failure in the cryo pod ejection system when cut. A crowbar will be needed to pry open the pod.
/// </summary>
public sealed partial class CryoPodEjectLockWireAction: ComponentWireAction<CryoPodComponent>
public sealed partial class CryoPodEjectLockWireAction : ComponentWireAction<CryoPodComponent>
{
public override Color Color { get; set; } = Color.Red;
public override string Name { get; set; } = "wire-name-lock";
@@ -18,7 +17,10 @@ public sealed partial class CryoPodEjectLockWireAction: ComponentWireAction<Cryo
public override bool Cut(EntityUid user, Wire wire, CryoPodComponent cryoPodComponent)
{
if (!cryoPodComponent.PermaLocked)
{
cryoPodComponent.Locked = true;
EntityManager.Dirty(wire.Owner, cryoPodComponent);
}
return true;
}
@@ -26,7 +28,10 @@ public sealed partial class CryoPodEjectLockWireAction: ComponentWireAction<Cryo
public override bool Mend(EntityUid user, Wire wire, CryoPodComponent cryoPodComponent)
{
if (!cryoPodComponent.PermaLocked)
{
cryoPodComponent.Locked = false;
EntityManager.Dirty(wire.Owner, cryoPodComponent);
}
return true;
}