2021-07-04 18:11:52 +02:00
|
|
|
|
using Content.Server.ParticleAccelerator.Components;
|
|
|
|
|
|
using Content.Server.Power.EntitySystems;
|
|
|
|
|
|
using JetBrains.Annotations;
|
|
|
|
|
|
using Robust.Shared.GameObjects;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.ParticleAccelerator.EntitySystems
|
|
|
|
|
|
{
|
|
|
|
|
|
[UsedImplicitly]
|
2022-02-16 00:23:23 -07:00
|
|
|
|
public sealed class ParticleAcceleratorPowerBoxSystem : EntitySystem
|
2021-07-04 18:11:52 +02:00
|
|
|
|
{
|
|
|
|
|
|
public override void Initialize()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Initialize();
|
|
|
|
|
|
|
|
|
|
|
|
SubscribeLocalEvent<ParticleAcceleratorPowerBoxComponent, PowerConsumerReceivedChanged>(
|
|
|
|
|
|
PowerBoxReceivedChanged);
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private static void PowerBoxReceivedChanged(
|
|
|
|
|
|
EntityUid uid,
|
|
|
|
|
|
ParticleAcceleratorPowerBoxComponent component,
|
|
|
|
|
|
PowerConsumerReceivedChanged args)
|
|
|
|
|
|
{
|
2021-08-22 16:50:43 +01:00
|
|
|
|
if (component.Master != null)
|
|
|
|
|
|
component.Master.PowerBoxReceivedChanged(args);
|
2021-07-04 18:11:52 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|