2021-10-24 01:23:19 +02:00
|
|
|
using System;
|
2021-10-11 23:41:18 +02:00
|
|
|
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";
|
|
|
|
|
|
2021-10-24 01:23:19 +02:00
|
|
|
|
2021-10-11 23:41:18 +02:00
|
|
|
/// <summary>
|
2021-10-24 01:23:19 +02:00
|
|
|
/// Valid device network NetIDs.
|
|
|
|
|
/// The netID is used to separate device networks that shouldn't interact with each other e.g. wireless and wired.
|
2021-10-11 23:41:18 +02:00
|
|
|
/// </summary>
|
2021-10-24 01:23:19 +02:00
|
|
|
[Serializable]
|
|
|
|
|
public enum ConnectionType
|
|
|
|
|
{
|
|
|
|
|
Private,
|
|
|
|
|
Wired,
|
|
|
|
|
Wireless,
|
|
|
|
|
Apc
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-11 23:41:18 +02:00
|
|
|
[DataField("deviceNetId")]
|
2021-10-24 01:23:19 +02:00
|
|
|
public ConnectionType DeviceNetId { get; set; } = ConnectionType.Private;
|
2021-10-11 23:41:18 +02:00
|
|
|
|
|
|
|
|
[DataField("frequency")]
|
|
|
|
|
public int Frequency { get; set; } = 0;
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public bool Open;
|
|
|
|
|
|
|
|
|
|
[ViewVariables]
|
|
|
|
|
public string Address = string.Empty;
|
|
|
|
|
|
|
|
|
|
[DataField("receiveAll")]
|
|
|
|
|
public bool ReceiveAll;
|
|
|
|
|
}
|
|
|
|
|
}
|