* Added selectable power level to radio jammer * Cleaned up OnGetVerb * Settings are now stored in the .yml file. Simplified stuff a lot! * Minor fixes! * Small little baby fix :) * Added the power level switch to the examine menu and also removed the ftl file as it was in the incorrect location. * Minor code cleanup * Changed byte -> int * Update sprite * Fixed licence * Added power LED that changes if the jammer is on low power. * Removed tabs * Changed github link to the commit * Changed all the RemComp to RemComDeferred * Moved NetworkedComponent to shared * Changed radio jammer textures back with minor edits * Added a space because it was annoying me * Jammer now updates range for suit sensors properly! Thanks nikthechampiongr :) * Removed useless comment * Cleaned up code that updates the range of tracking devices. * Fixed client namespace and removed newline * Cleaned up ChangeLEDState and ChangeChargeLevel. * Added comments * Read only * Fixed another comment * Locked in * Made server inherit shared * Update Content.Shared/Radio/EntitySystems/SharedJammerSystem.cs * Update Content.Shared/Radio/EntitySystems/SharedJammerSystem.cs * review fixes --------- Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
75 lines
1.7 KiB
C#
75 lines
1.7 KiB
C#
using Robust.Shared.Serialization;
|
|
using Robust.Shared.GameStates;
|
|
|
|
namespace Content.Shared.RadioJammer;
|
|
|
|
/// <summary>
|
|
/// When activated (<see cref="ActiveRadioJammerComponent"/>) prevents from sending messages in range
|
|
/// Suit sensors will also stop working.
|
|
/// </summary>
|
|
[NetworkedComponent, RegisterComponent]
|
|
public sealed partial class RadioJammerComponent : Component
|
|
{
|
|
[DataDefinition]
|
|
public partial struct RadioJamSetting
|
|
{
|
|
/// <summary>
|
|
/// Power usage per second when enabled.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public float Wattage;
|
|
|
|
/// <summary>
|
|
/// Range of the jammer.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public float Range;
|
|
|
|
/// <summary>
|
|
/// The message that is displayed when switched
|
|
/// to this setting.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public LocId Message = string.Empty;
|
|
|
|
/// <summary>
|
|
/// Name of the setting.
|
|
/// </summary>
|
|
[DataField(required: true)]
|
|
public LocId Name = string.Empty;
|
|
}
|
|
|
|
/// <summary>
|
|
/// List of all the settings for the radio jammer.
|
|
/// </summary>
|
|
[DataField(required: true), ViewVariables(VVAccess.ReadOnly)]
|
|
public RadioJamSetting[] Settings;
|
|
|
|
/// <summary>
|
|
/// Index of the currently selected setting.
|
|
/// </summary>
|
|
[DataField]
|
|
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
|
|
}
|