Files
tbd-station-14/Content.Server/Light/EntitySystems/RotatingLightSystem.cs
Tayrtahn 4a83c36585 Code cleanup: Dirty(Comp) (#26238)
* Replaced uses of Dirty(Component) with Dirty(Uid, Component)
Modified some systems (notably pulling-related) to use uids.

* Missed a few

* Revert changes to pulling

* No
2024-03-19 23:27:02 -04:00

25 lines
631 B
C#

using Content.Shared.Light;
using Content.Shared.Light.Components;
using Robust.Shared.GameObjects;
namespace Content.Server.Light.EntitySystems;
public sealed class RotatingLightSystem : SharedRotatingLightSystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RotatingLightComponent, PointLightToggleEvent>(OnLightToggle);
}
private void OnLightToggle(EntityUid uid, RotatingLightComponent comp, PointLightToggleEvent args)
{
if (comp.Enabled == args.Enabled)
return;
comp.Enabled = args.Enabled;
Dirty(uid, comp);
}
}