Pressure & volume pumps can be toggled on/off now. (#3046)
This tidbit might or might not be suitable for a separate component. Tell me in PR comments I guess.
This commit is contained in:
@@ -4,6 +4,7 @@ using Content.Server.Atmos;
|
||||
using Content.Server.GameObjects.Components.NodeContainer;
|
||||
using Content.Server.GameObjects.Components.NodeContainer.Nodes;
|
||||
using Content.Shared.GameObjects.Components.Atmos;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
@@ -16,7 +17,7 @@ namespace Content.Server.GameObjects.Components.Atmos.Piping.Pumps
|
||||
/// <summary>
|
||||
/// Transfer gas from one <see cref="PipeNode"/> to another.
|
||||
/// </summary>
|
||||
public abstract class BasePumpComponent : Component
|
||||
public abstract class BasePumpComponent : Component, IActivate
|
||||
{
|
||||
/// <summary>
|
||||
/// If the pump is currently pumping.
|
||||
@@ -100,6 +101,11 @@ namespace Content.Server.GameObjects.Components.Atmos.Piping.Pumps
|
||||
_appearance?.SetData(PumpVisuals.VisualState, new PumpVisualState(_initialInletDirection, _initialOutletDirection, PumpEnabled));
|
||||
}
|
||||
|
||||
public void Activate(ActivateEventArgs eventArgs)
|
||||
{
|
||||
PumpEnabled = !PumpEnabled;
|
||||
}
|
||||
|
||||
private void SetPipes()
|
||||
{
|
||||
_inletPipe = null;
|
||||
|
||||
Reference in New Issue
Block a user