mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-10-04 05:17:28 +00:00
35 lines
1.1 KiB
C#
35 lines
1.1 KiB
C#
using Content.Shared._DV.Movement;
|
|
using Content.Shared.Actions;
|
|
using Content.Shared.Movement.Systems;
|
|
|
|
namespace Content.Server._DV.Movement;
|
|
|
|
public sealed class CursorOffsetActionSystem : SharedCursorOffsetActionSystem
|
|
{
|
|
[Dependency] private readonly SharedActionsSystem _actions = default!;
|
|
[Dependency] private readonly SharedContentEyeSystem _eye = default!;
|
|
|
|
public override void Initialize()
|
|
{
|
|
base.Initialize();
|
|
|
|
//SubscribeLocalEvent<CursorOffsetActionComponent, ComponentInit>(OnInit);
|
|
//SubscribeLocalEvent<CursorOffsetActionComponent, CursorOffsetActionEvent>(OnAction);
|
|
}
|
|
|
|
private void OnInit(Entity<CursorOffsetActionComponent> ent, ref ComponentInit args)
|
|
{
|
|
_actions.AddAction(ent, ref ent.Comp.CursorOffsetActionEntity, ent.Comp.CursorOffsetActionId );
|
|
|
|
if (_actions.GetAction(ent.Comp.CursorOffsetActionEntity) is not { Comp.UseDelay: not null })
|
|
{
|
|
_actions.StartUseDelay(ent.Comp.CursorOffsetActionEntity);
|
|
}
|
|
}
|
|
|
|
private void OnAction(Entity<CursorOffsetActionComponent> ent, ref CursorOffsetActionEvent args)
|
|
{
|
|
args.Handled = true;
|
|
}
|
|
}
|