Deep Space Com
This commit is contained in:
15
Content.Shared/_White/DeepSpaceCom/DeepSpaceComComponent.cs
Normal file
15
Content.Shared/_White/DeepSpaceCom/DeepSpaceComComponent.cs
Normal file
@@ -0,0 +1,15 @@
|
||||
using Content.Shared.Radio;
|
||||
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
|
||||
using Robust.Shared.GameStates;
|
||||
|
||||
namespace Content.Shared._White.DeepSpaceCom;
|
||||
|
||||
[RegisterComponent, NetworkedComponent]
|
||||
public sealed partial class DeepSpaceComComponent : Component
|
||||
{
|
||||
[DataField("requiresPower"), ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool RequiresPower = true;
|
||||
|
||||
[DataField("supportedChannels", customTypeSerializer: typeof(PrototypeIdListSerializer<RadioChannelPrototype>))]
|
||||
public List<string> SupportedChannels = new();
|
||||
}
|
||||
59
Content.Shared/_White/DeepSpaceCom/SharedDeepSpaceCom.cs
Normal file
59
Content.Shared/_White/DeepSpaceCom/SharedDeepSpaceCom.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared._White.DeepSpaceCom;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum DeepSpaceComUiKey
|
||||
{
|
||||
Key
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class DeepSpaceComBoundUIState : BoundUserInterfaceState
|
||||
{
|
||||
public bool MicEnabled;
|
||||
public bool SpeakerEnabled;
|
||||
public List<string> AvailableChannels;
|
||||
public string SelectedChannel;
|
||||
|
||||
public DeepSpaceComBoundUIState(bool micEnabled, bool speakerEnabled, List<string> availableChannels, string selectedChannel)
|
||||
{
|
||||
MicEnabled = micEnabled;
|
||||
SpeakerEnabled = speakerEnabled;
|
||||
AvailableChannels = availableChannels;
|
||||
SelectedChannel = selectedChannel;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class ToggleDeepSpaceComMicrophoneMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public bool Enabled;
|
||||
|
||||
public ToggleDeepSpaceComMicrophoneMessage(bool enabled)
|
||||
{
|
||||
Enabled = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class ToggleDeepSpaceComSpeakerMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public bool Enabled;
|
||||
|
||||
public ToggleDeepSpaceComSpeakerMessage(bool enabled)
|
||||
{
|
||||
Enabled = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class SelectDeepSpaceComChannelMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public string Channel;
|
||||
|
||||
public SelectDeepSpaceComChannelMessage(string channel)
|
||||
{
|
||||
Channel = channel;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user