* Content update for UI refactor * Big update * Sharing * Remaining content updates * First big update * Prototype updates * AUGH * Fix UI comp ref * Cleanup - Fix predicted message, fix item slots, fix interaction range check. * Fix regressions * Make this predictive idk why it wasn't. * Fix slime merge * Merge conflict * Fix merge
39 lines
1.5 KiB
C#
39 lines
1.5 KiB
C#
using Content.Server.ParticleAccelerator.Components;
|
|
using Content.Server.ParticleAccelerator.EntitySystems;
|
|
using Content.Server.Wires;
|
|
using Content.Shared.Singularity.Components;
|
|
using Content.Shared.Wires;
|
|
using Robust.Shared.Player;
|
|
|
|
namespace Content.Server.ParticleAccelerator.Wires;
|
|
|
|
public sealed partial class ParticleAcceleratorStrengthWireAction : ComponentWireAction<ParticleAcceleratorControlBoxComponent>
|
|
{
|
|
public override string Name { get; set; } = "wire-name-pa-strength";
|
|
public override Color Color { get; set; } = Color.Blue;
|
|
public override object StatusKey { get; } = ParticleAcceleratorWireStatus.Strength;
|
|
|
|
public override StatusLightState? GetLightState(Wire wire, ParticleAcceleratorControlBoxComponent component)
|
|
{
|
|
return component.StrengthLocked ? StatusLightState.BlinkingSlow : StatusLightState.On;
|
|
}
|
|
|
|
public override bool Cut(EntityUid user, Wire wire, ParticleAcceleratorControlBoxComponent controller)
|
|
{
|
|
controller.StrengthLocked = true;
|
|
return true;
|
|
}
|
|
|
|
public override bool Mend(EntityUid user, Wire wire, ParticleAcceleratorControlBoxComponent controller)
|
|
{
|
|
controller.StrengthLocked = false;
|
|
return true;
|
|
}
|
|
|
|
public override void Pulse(EntityUid user, Wire wire, ParticleAcceleratorControlBoxComponent controller)
|
|
{
|
|
var paSystem = EntityManager.System<ParticleAcceleratorSystem>();
|
|
paSystem.SetStrength(wire.Owner, (ParticleAcceleratorPowerState) ((int) controller.SelectedStrength + 1), user, controller);
|
|
}
|
|
}
|