mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 18:31:17 +03:00
21 lines
722 B
C#
21 lines
722 B
C#
using Content.Client.Light.EntitySystems;
|
|
using Content.Shared.Trigger;
|
|
using Content.Shared.Trigger.Components.Effects;
|
|
using Robust.Shared.Timing;
|
|
|
|
namespace Content.Client.Trigger.Systems;
|
|
|
|
/// <summary>
|
|
/// This handles...
|
|
/// </summary>
|
|
public sealed partial class LightBehaviorOnTriggerSystem : XOnTriggerSystem<LightBehaviorOnTriggerComponent>
|
|
{
|
|
[Dependency] private IGameTiming _timing = default!;
|
|
[Dependency] private LightBehaviorSystem _light = default!;
|
|
|
|
protected override void OnTrigger(Entity<LightBehaviorOnTriggerComponent> ent, EntityUid target, ref TriggerEvent args)
|
|
{
|
|
if (_timing.IsFirstTimePredicted)
|
|
_light.StartLightBehaviour(target, ent.Comp.Behavior);
|
|
}
|
|
}
|