Files
wwdpublic/Content.Shared/DeviceNetwork/Components/DeviceNetworkJammerComponent.cs
Tayrtahn 9e1c0ddba6 Code cleanup: radio jammer (#29052)
* Code cleanup for radio jammer

* More Entity<T> for the people, and fix an accidental variable reuse

(cherry picked from commit e33f0341ada2d8bd6ed4195ac3f0578b23e4ba8c)
2026-02-07 14:18:54 +03:00

27 lines
922 B
C#

using Content.Shared.DeviceNetwork.Systems;
using Robust.Shared.GameStates;
namespace Content.Shared.DeviceNetwork.Components;
/// <summary>
/// Allow entities to jam DeviceNetwork packets.
/// </summary>
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedDeviceNetworkJammerSystem))]
public sealed partial class DeviceNetworkJammerComponent : Component
{
/// <summary>
/// Range where packets will be jammed. This is checked both against the sender and receiver.
/// </summary>
[DataField, AutoNetworkedField]
public float Range = 5.0f;
/// <summary>
/// Device networks that can be jammed. For a list of default NetworkIds see DeviceNetIdDefaults on Content.Server.
/// Network ids are not guaranteed to be limited to DeviceNetIdDefaults.
/// </summary>
[DataField, AutoNetworkedField]
public HashSet<string> JammableNetworks = [];
}