Files
tbd-station-14/Content.Server/Chemistry/EntitySystems/SolutionContainerMixerSystem.cs
Nemanja 2455980090 Electrolysis and Centrifuge (#22517)
* electrolysis and centrifuge

* sprote

* final

* bomp!

* COUGH COUGH SPROTE

* boarsd
2023-12-15 02:52:46 -07:00

30 lines
850 B
C#

using Content.Server.Power.Components;
using Content.Server.Power.EntitySystems;
using Content.Shared.Chemistry.Components;
using Content.Shared.Chemistry.EntitySystems;
namespace Content.Server.Chemistry.EntitySystems;
/// <inheritdoc/>
public sealed class SolutionContainerMixerSystem : SharedSolutionContainerMixerSystem
{
/// <inheritdoc/>
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<SolutionContainerMixerComponent, PowerChangedEvent>(OnPowerChanged);
}
private void OnPowerChanged(Entity<SolutionContainerMixerComponent> ent, ref PowerChangedEvent args)
{
if (!args.Powered)
StopMix(ent);
}
protected override bool HasPower(Entity<SolutionContainerMixerComponent> entity)
{
return this.IsPowered(entity, EntityManager);
}
}