* 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
25 lines
631 B
C#
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);
|
|
}
|
|
}
|