CatStation/Content.Shared/Power/EntitySystems/SharedPowerNetSystem.cs
Pieter-Jan Briers 5168b5f3d4
IoC source gen compatibility (#43863)
* IoC source gen compatibility

Can be merged before or after https://github.com/space-wizards/RobustToolbox/pull/6549 doesn't really matter.

* Missed a spot
2026-05-09 03:29:58 +00:00

21 lines
674 B
C#

using Content.Shared.Power.Components;
namespace Content.Shared.Power.EntitySystems;
public abstract partial class SharedPowerNetSystem : EntitySystem
{
[Dependency] private SharedAppearanceSystem _appearance = default!;
public abstract bool IsPoweredCalculate(SharedApcPowerReceiverComponent comp);
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<AppearanceComponent, PowerChangedEvent>(OnPowerAppearance);
}
private void OnPowerAppearance(Entity<AppearanceComponent> ent, ref PowerChangedEvent args)
{
_appearance.SetData(ent, PowerDeviceVisuals.Powered, args.Powered, ent.Comp);
}
}