Add telecomms system (#14486)
This commit is contained in:
@@ -1,28 +1,38 @@
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Shared.Radio
|
||||
namespace Content.Shared.Radio;
|
||||
|
||||
[Prototype("radioChannel")]
|
||||
public sealed class RadioChannelPrototype : IPrototype
|
||||
{
|
||||
[Prototype("radioChannel")]
|
||||
public sealed class RadioChannelPrototype : IPrototype
|
||||
{
|
||||
/// <summary>
|
||||
/// Human-readable name for the channel.
|
||||
/// </summary>
|
||||
[DataField("name")] public string Name { get; private set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// Human-readable name for the channel.
|
||||
/// </summary>
|
||||
[DataField("name")]
|
||||
public string Name { get; private set; } = string.Empty;
|
||||
|
||||
[ViewVariables(VVAccess.ReadOnly)] public string LocalizedName => Loc.GetString(Name);
|
||||
[ViewVariables(VVAccess.ReadOnly)]
|
||||
public string LocalizedName => Loc.GetString(Name);
|
||||
|
||||
/// <summary>
|
||||
/// Single-character prefix to determine what channel a message should be sent to.
|
||||
/// </summary>
|
||||
[DataField("keycode")] public char KeyCode { get; private set; } = '\0';
|
||||
/// <summary>
|
||||
/// Single-character prefix to determine what channel a message should be sent to.
|
||||
/// </summary>
|
||||
[DataField("keycode")]
|
||||
public char KeyCode { get; private set; } = '\0';
|
||||
|
||||
[DataField("frequency")] public int Frequency { get; private set; } = 0;
|
||||
[DataField("frequency")]
|
||||
public int Frequency { get; private set; } = 0;
|
||||
|
||||
[DataField("color")] public Color Color { get; private set; } = Color.Lime;
|
||||
[DataField("color")]
|
||||
public Color Color { get; private set; } = Color.Lime;
|
||||
|
||||
[ViewVariables]
|
||||
[IdDataField]
|
||||
public string ID { get; } = default!;
|
||||
}
|
||||
[IdDataField, ViewVariables]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
/// <summary>
|
||||
/// If channel is long range it doesn't require telecommunication server
|
||||
/// and messages can be sent across different stations
|
||||
/// </summary>
|
||||
[DataField("longRange"), ViewVariables]
|
||||
public bool LongRange = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user