mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-17 05:27:38 +03:00
<!-- This is a semi-strict format, you can add/remove sections as needed but the order/format should be kept the same Remove these comments before submitting --> # Description <!-- Explain this PR in as much detail as applicable Some example prompts to consider: How might this affect the game? The codebase? What might be some alternatives to this? How/Who does this benefit/hurt [the game/codebase]? --> Adds frequencies to handheld radios. Ports [this PR](https://github.com/new-frontiers-14/frontier-station-14/pull/1833) with changes.  --- # Changelog <!-- You can add an author after the `🆑` to change the name that appears in the changelog (ex: `🆑 Death`) Leaving it blank will default to your GitHub display name This includes all available types for the changelog --> 🆑 - add: Added handheld radio frequencies, accessible by pressing your "Use Item" key while holding one. --------- Co-authored-by: Whatstone <166147148+whatston3@users.noreply.github.com> (cherry picked from commit 19a350fc9ae0d958406b3d6018f71ab8af5447c4)
47 lines
1.4 KiB
C#
47 lines
1.4 KiB
C#
using Robust.Shared.Prototypes;
|
|
|
|
namespace Content.Shared.Radio;
|
|
|
|
[Prototype("radioChannel")]
|
|
public sealed partial class RadioChannelPrototype : IPrototype
|
|
{
|
|
/// <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);
|
|
|
|
/// <summary>
|
|
/// Single-character prefix to determine what channel a message should be sent to.
|
|
/// </summary>
|
|
[DataField("keycodes")]
|
|
public List<char> KeyCodes { get; private set; } = new() {'\0'}; // WD EDIT
|
|
|
|
[DataField("frequency")]
|
|
public int Frequency { get; private set; } = 0;
|
|
|
|
[DataField("color")]
|
|
public Color Color { get; private set; } = Color.Lime;
|
|
|
|
[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;
|
|
|
|
// Frontier: radio channel frequencies
|
|
/// <summary>
|
|
/// If true, the frequency of the message being sent will be appended to the chat message
|
|
/// </summary>
|
|
[DataField, ViewVariables]
|
|
public bool ShowFrequency = false;
|
|
// End Frontier
|
|
}
|