mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-22 16:17:00 +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)
58 lines
1.3 KiB
C#
58 lines
1.3 KiB
C#
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared._NC.Radio;
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum HandheldRadioUiKey : byte
|
|
{
|
|
Key,
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class HandheldRadioBoundUIState : BoundUserInterfaceState
|
|
{
|
|
public bool MicEnabled;
|
|
public bool SpeakerEnabled;
|
|
public int Frequency;
|
|
|
|
public HandheldRadioBoundUIState(bool micEnabled, bool speakerEnabled, int frequency)
|
|
{
|
|
MicEnabled = micEnabled;
|
|
SpeakerEnabled = speakerEnabled;
|
|
Frequency = frequency;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class ToggleHandheldRadioMicMessage : BoundUserInterfaceMessage
|
|
{
|
|
public bool Enabled;
|
|
|
|
public ToggleHandheldRadioMicMessage(bool enabled)
|
|
{
|
|
Enabled = enabled;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class ToggleHandheldRadioSpeakerMessage : BoundUserInterfaceMessage
|
|
{
|
|
public bool Enabled;
|
|
|
|
public ToggleHandheldRadioSpeakerMessage(bool enabled)
|
|
{
|
|
Enabled = enabled;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class SelectHandheldRadioFrequencyMessage : BoundUserInterfaceMessage
|
|
{
|
|
public int Frequency;
|
|
|
|
public SelectHandheldRadioFrequencyMessage(int frequency)
|
|
{
|
|
Frequency = frequency;
|
|
}
|
|
}
|