Predict cryopods (#39385)
Co-authored-by: ArtisticRoomba <145879011+ArtisticRoomba@users.noreply.github.com>
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user