Machine Linking Overhaul (#7160)

This commit is contained in:
Jack Fox
2022-04-04 01:13:03 -05:00
committed by GitHub
parent fd7ea3f1e7
commit f957c58906
40 changed files with 605 additions and 696 deletions

View File

@@ -5,12 +5,10 @@ namespace Content.Server.MachineLinking.Events
public sealed class InvokePortEvent : EntityEventArgs
{
public readonly string Port;
public readonly object? Value;
public InvokePortEvent(string port, object? value = null)
public InvokePortEvent(string port)
{
Port = port;
Value = value;
}
}
}

View File

@@ -5,19 +5,17 @@ namespace Content.Server.MachineLinking.Events
{
public sealed class LinkAttemptEvent : CancellableEntityEventArgs
{
public readonly EntityUid Attemptee;
public readonly SignalTransmitterComponent TransmitterComponent;
public readonly string TransmitterPort;
public readonly SignalReceiverComponent ReceiverComponent;
public readonly string ReceiverPort;
public LinkAttemptEvent(EntityUid attemptee, SignalTransmitterComponent transmitterComponent, string transmitterPort, SignalReceiverComponent receiverComponent, string receiverPort)
public LinkAttemptEvent(SignalTransmitterComponent transmitterComponent, string transmitterPort, SignalReceiverComponent receiverComponent, string receiverPort)
{
TransmitterComponent = transmitterComponent;
this.TransmitterPort = transmitterPort;
ReceiverComponent = receiverComponent;
this.ReceiverPort = receiverPort;
Attemptee = attemptee;
}
}
}

View File

@@ -5,12 +5,10 @@ namespace Content.Server.MachineLinking.Events
public sealed class SignalReceivedEvent : EntityEventArgs
{
public readonly string Port;
public readonly object? Value;
public SignalReceivedEvent(string port, object? value)
public SignalReceivedEvent(string port)
{
Port = port;
Value = value;
}
}
}

View File

@@ -1,19 +0,0 @@
using System;
using Robust.Shared.GameObjects;
namespace Content.Server.MachineLinking.Events
{
public sealed class SignalValueRequestedEvent : HandledEntityEventArgs
{
public readonly string Port;
public readonly Type Type;
public object? Signal;
public SignalValueRequestedEvent(string port, Type type)
{
Port = port;
Type = type;
}
}
}