machine linking refactor to ecs (#4323)
* started work * some more work, ui working (somewhat) * stuff * reorganization * some more reorg * conveyors * conveyors working * finalized (dis)connection added linkattempt added feedback text work on conveyors * removed command add rangecheck * fixed inrange check * handling * ui no longer kanser, ship it * adresses reviews * reformats file * reformats file Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
This commit is contained in:
@@ -13,7 +13,7 @@ namespace Content.Shared.MachineLinking
|
||||
public enum TwoWayLeverSignal : byte
|
||||
{
|
||||
Middle,
|
||||
Left,
|
||||
Right
|
||||
Right,
|
||||
Left
|
||||
}
|
||||
}
|
||||
|
||||
17
Content.Shared/MachineLinking/UIKeys.cs
Normal file
17
Content.Shared/MachineLinking/UIKeys.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.MachineLinking
|
||||
{
|
||||
[Serializable, NetSerializable]
|
||||
public enum SignalTransmitterUiKey
|
||||
{
|
||||
Key
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum SignalReceiverUiKey
|
||||
{
|
||||
Key
|
||||
}
|
||||
}
|
||||
37
Content.Shared/MachineLinking/UIMessages.cs
Normal file
37
Content.Shared/MachineLinking/UIMessages.cs
Normal file
@@ -0,0 +1,37 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.MachineLinking
|
||||
{
|
||||
[Serializable, NetSerializable]
|
||||
public class SignalPortsState : BoundUserInterfaceState
|
||||
{
|
||||
/// <summary>
|
||||
/// A Dictionary containing all ports and wether or not they can be selected.
|
||||
/// </summary>
|
||||
public readonly Dictionary<string, bool> Ports;
|
||||
|
||||
public SignalPortsState(string[] ports) : this(ports.ToDictionary(s => s, _ => true))
|
||||
{
|
||||
}
|
||||
|
||||
public SignalPortsState(Dictionary<string, bool> ports)
|
||||
{
|
||||
Ports = ports;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class SignalPortSelected : BoundUserInterfaceMessage
|
||||
{
|
||||
public readonly string Port;
|
||||
|
||||
public SignalPortSelected(string port)
|
||||
{
|
||||
Port = port;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user