using Robust.Shared.Serialization;
using Robust.Shared.GameStates;
namespace Content.Shared.Radio.Components;
///
/// When activated () prevents from sending messages in range
/// Suit sensors will also stop working.
///
[NetworkedComponent, RegisterComponent]
[AutoGenerateComponentState]
public sealed partial class RadioJammerComponent : Component
{
[DataDefinition]
public partial struct RadioJamSetting
{
///
/// Power usage per second when enabled.
///
[DataField(required: true)]
public float Wattage;
///
/// Range of the jammer.
///
[DataField(required: true)]
public float Range;
///
/// The message that is displayed when switched.
/// to this setting.
///
[DataField(required: true)]
public LocId Message = string.Empty;
///
/// Name of the setting.
///
[DataField(required: true)]
public LocId Name = string.Empty;
}
///
/// List of all the settings for the radio jammer.
///
[DataField(required: true), ViewVariables(VVAccess.ReadOnly)]
public RadioJamSetting[] Settings;
///
/// Frequencies that are NOT jammed by this jammer.
///
[DataField]
public HashSet FrequenciesExcluded = [];
///
/// Index of the currently selected setting.
///
[DataField]
[AutoNetworkedField]
public int SelectedPowerLevel = 1;
}
[Serializable, NetSerializable]
public enum RadioJammerChargeLevel : byte
{
Low,
Medium,
High
}
[Serializable, NetSerializable]
public enum RadioJammerLayers : byte
{
LED
}
[Serializable, NetSerializable]
public enum RadioJammerVisuals : byte
{
ChargeLevel,
LEDOn
}