using Content.Shared.DeviceNetwork.Components;
using Content.Shared.DeviceNetwork.Systems;
namespace Content.Shared.DeviceNetwork;
///
/// Represents a device in a .
///
///
/// This type is read-only. To change any parameters of the device, use 's API.
///
[DataRecord]
public readonly partial record struct Device(EntityUid Owner, uint? ReceiveFrequency, string Address, bool ReceiveAll)
{
public Device(Entity ent) : this(
ent.Owner,
ent.Comp.ReceiveFrequency,
ent.Comp.Address,
ent.Comp.ReceiveAll)
{
Owner = ent.Owner;
ReceiveFrequency = ent.Comp.ReceiveFrequency;
ReceiveAll = ent.Comp.ReceiveAll;
}
}