Converts the particle accelerator over to ECS + misc (#17075)
Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using Content.Server.ParticleAccelerator.Components;
|
||||
using Content.Server.Wires;
|
||||
using Content.Shared.Singularity.Components;
|
||||
using Content.Shared.Wires;
|
||||
|
||||
namespace Content.Server.ParticleAccelerator.Wires;
|
||||
|
||||
public sealed class ParticleAcceleratorKeyboardWireAction : ComponentWireAction<ParticleAcceleratorControlBoxComponent>
|
||||
{
|
||||
public override string Name { get; set; } = "wire-name-pa-keyboard";
|
||||
public override Color Color { get; set; } = Color.LimeGreen;
|
||||
public override object StatusKey { get; } = ParticleAcceleratorWireStatus.Keyboard;
|
||||
|
||||
public override StatusLightState? GetLightState(Wire wire, ParticleAcceleratorControlBoxComponent component)
|
||||
{
|
||||
return component.InterfaceDisabled ? StatusLightState.BlinkingFast : StatusLightState.On;
|
||||
}
|
||||
|
||||
public override bool Cut(EntityUid user, Wire wire, ParticleAcceleratorControlBoxComponent controller)
|
||||
{
|
||||
controller.InterfaceDisabled = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override bool Mend(EntityUid user, Wire wire, ParticleAcceleratorControlBoxComponent controller)
|
||||
{
|
||||
controller.InterfaceDisabled = false;
|
||||
return true;
|
||||
}
|
||||
|
||||
public override void Pulse(EntityUid user, Wire wire, ParticleAcceleratorControlBoxComponent controller)
|
||||
{
|
||||
controller.InterfaceDisabled = !controller.InterfaceDisabled;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user