2021-07-04 18:11:52 +02:00
|
|
|
|
using Content.Server.ParticleAccelerator.Components;
|
|
|
|
|
|
using Content.Server.Power.EntitySystems;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Content.Server.ParticleAccelerator.EntitySystems
|
|
|
|
|
|
{
|
2022-03-29 03:58:51 +11:00
|
|
|
|
public sealed partial class ParticleAcceleratorSystem
|
2021-07-04 18:11:52 +02:00
|
|
|
|
{
|
2022-03-29 03:58:51 +11:00
|
|
|
|
private void InitializePowerBoxSystem()
|
2021-07-04 18:11:52 +02:00
|
|
|
|
{
|
2022-03-29 03:58:51 +11:00
|
|
|
|
SubscribeLocalEvent<ParticleAcceleratorPowerBoxComponent, PowerConsumerReceivedChanged>(PowerBoxReceivedChanged);
|
2021-07-04 18:11:52 +02:00
|
|
|
|
}
|
|
|
|
|
|
|
2023-04-09 21:10:33 -07:00
|
|
|
|
private void PowerBoxReceivedChanged(
|
2021-07-04 18:11:52 +02:00
|
|
|
|
EntityUid uid,
|
|
|
|
|
|
ParticleAcceleratorPowerBoxComponent component,
|
2022-10-15 15:08:15 +11:00
|
|
|
|
ref PowerConsumerReceivedChanged args)
|
2021-07-04 18:11:52 +02:00
|
|
|
|
{
|
2023-04-09 21:10:33 -07:00
|
|
|
|
if (TryComp(uid, out ParticleAcceleratorPartComponent? paPart))
|
|
|
|
|
|
paPart.Master?.PowerBoxReceivedChanged(args);
|
2021-07-04 18:11:52 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|