Files
OldThink/Content.Server/MachineLinking/System/SignalButtonSystem.cs

26 lines
751 B
C#
Raw Normal View History

using Content.Server.MachineLinking.Components;
using Content.Server.MachineLinking.Events;
using Content.Shared.Interaction;
2021-10-10 03:43:50 -07:00
using JetBrains.Annotations;
using Robust.Shared.GameObjects;
namespace Content.Server.MachineLinking.System
{
2021-10-10 03:43:50 -07:00
[UsedImplicitly]
public sealed class SignalButtonSystem : EntitySystem
{
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<SignalButtonComponent, InteractHandEvent>(OnInteractHand);
}
private void OnInteractHand(EntityUid uid, SignalButtonComponent component, InteractHandEvent args)
{
RaiseLocalEvent(uid, new InvokePortEvent("pressed"), false);
args.Handled = true;
}
}
}