CatStation/Content.Server/Light/EntitySystems/LightCycleSystem.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

22 lines
604 B
C#

using Content.Shared;
using Content.Shared.Light.Components;
using Content.Shared.Light.EntitySystems;
using Robust.Shared.Random;
namespace Content.Server.Light.EntitySystems;
/// <inheritdoc/>
public sealed partial class LightCycleSystem : SharedLightCycleSystem
{
[Dependency] private IRobustRandom _random = default!;
protected override void OnCycleMapInit(Entity<LightCycleComponent> ent, ref MapInitEvent args)
{
base.OnCycleMapInit(ent, ref args);
if (ent.Comp.InitialOffset)
{
SetOffset(ent, _random.Next(ent.Comp.Duration));
}
}
}