Device network as ecs (#4205)
* Work on DeviceNetworkSystem * Implement device networking as ecs Remove mailing unit code for now Remove device network metadata * Implement integration tests for device networking * Remove manual updating DeviceNetworkSystem and use WaitRunTicks * Fix wrong component name in ignored components * Apply suggestions from code review Co-authored-by: mirrorcult <notzombiedude@gmail.com> * Rename NetworkUtils to DeviceNetworkConstants Change connection type constants to enum Remove create function from network payload class * Change broken nodegroup check in wirenet to grid check * Change ComponentManager to entity manager in DeviceNetworkSystem * Fix smaller mistakes * Wtf random test fail pls run them again smh * Fix DataField in DeviceNetworkComponent * Fix yaml in DeviceNetworkTest * Fix DeviceNetworkComponent DeviceNetId property Co-authored-by: Julian Giebel <j.giebel@netrocks.info> Co-authored-by: mirrorcult <notzombiedude@gmail.com>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Server.DeviceNetwork.Components
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class DeviceNetworkComponent : Component
|
||||
{
|
||||
public override string Name => "DeviceNetworkComponent";
|
||||
|
||||
/// <summary>
|
||||
/// The device networks netID this DeviceNetworkComponent connects to.
|
||||
/// The netID is used to seperate device networks that shouldn't interact with each other e.g. wireless and wired.
|
||||
/// The default netID's are_
|
||||
/// 0 -> Private
|
||||
/// 1 -> Wired
|
||||
/// 2 -> Wireless
|
||||
/// </summary>
|
||||
[DataField("deviceNetId")]
|
||||
public int DeviceNetId { get; set; } = (int)DeviceNetworkConstants.ConnectionType.Private;
|
||||
|
||||
[DataField("frequency")]
|
||||
public int Frequency { get; set; } = 0;
|
||||
|
||||
[ViewVariables]
|
||||
public bool Open;
|
||||
|
||||
[ViewVariables]
|
||||
public string Address = string.Empty;
|
||||
|
||||
[DataField("receiveAll")]
|
||||
public bool ReceiveAll;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user