2022-07-29 14:13:12 +12:00
|
|
|
using Robust.Shared.Audio;
|
2022-09-05 17:55:44 -07:00
|
|
|
using Robust.Shared.GameStates;
|
|
|
|
|
using Robust.Shared.Serialization;
|
2022-06-10 03:28:24 +02:00
|
|
|
|
2022-09-05 17:55:44 -07:00
|
|
|
namespace Content.Shared.DeviceNetwork;
|
2022-06-10 03:28:24 +02:00
|
|
|
|
|
|
|
|
[RegisterComponent]
|
2022-09-05 17:55:44 -07:00
|
|
|
[NetworkedComponent]
|
|
|
|
|
[Access(typeof(SharedNetworkConfiguratorSystem))]
|
2022-06-10 03:28:24 +02:00
|
|
|
public sealed class NetworkConfiguratorComponent : Component
|
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The entity containing a <see cref="DeviceListComponent"/> this configurator is currently interacting with
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("activeDeviceList")]
|
|
|
|
|
public EntityUid? ActiveDeviceList = null;
|
|
|
|
|
|
2022-09-05 17:55:44 -07:00
|
|
|
/// <summary>
|
|
|
|
|
/// The list of devices stored in the configurator-
|
|
|
|
|
/// </summary>
|
|
|
|
|
[DataField("devices")]
|
|
|
|
|
public Dictionary<string, EntityUid> Devices = new();
|
|
|
|
|
|
2022-06-10 03:28:24 +02:00
|
|
|
[DataField("soundNoAccess")]
|
|
|
|
|
public SoundSpecifier SoundNoAccess = new SoundPathSpecifier("/Audio/Machines/custom_deny.ogg");
|
|
|
|
|
}
|
2022-09-05 17:55:44 -07:00
|
|
|
|
|
|
|
|
[Serializable, NetSerializable]
|
|
|
|
|
public sealed class NetworkConfiguratorComponentState : ComponentState
|
|
|
|
|
{
|
|
|
|
|
public readonly EntityUid? ActiveDeviceList;
|
|
|
|
|
|
|
|
|
|
public NetworkConfiguratorComponentState(EntityUid? activeDeviceList)
|
|
|
|
|
{
|
|
|
|
|
ActiveDeviceList = activeDeviceList;
|
|
|
|
|
}
|
|
|
|
|
}
|