Intercoms [crappy radios] (#12898)

This commit is contained in:
Nemanja
2022-12-13 20:39:54 -05:00
committed by GitHub
parent a3c8d2e306
commit 00497177f8
17 changed files with 408 additions and 5 deletions

View File

@@ -1,6 +1,7 @@
using Content.Server.Radio.EntitySystems;
using Content.Shared.Radio;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype.List;
namespace Content.Server.Radio.Components;
@@ -15,10 +16,23 @@ public sealed class RadioMicrophoneComponent : Component
[DataField("broadcastChannel", customTypeSerializer: typeof(PrototypeIdSerializer<RadioChannelPrototype>))]
public string BroadcastChannel = "Common";
[ViewVariables, DataField("supportedChannels", customTypeSerializer: typeof(PrototypeIdListSerializer<RadioChannelPrototype>))]
public List<string>? SupportedChannels;
[ViewVariables(VVAccess.ReadWrite)]
[DataField("listenRange")]
public int ListenRange = 4;
[DataField("enabled")]
public bool Enabled = false;
[DataField("powerRequired")]
public bool PowerRequired = false;
/// <summary>
/// Whether or not the speaker must have an
/// unobstructed path to the radio to speak
/// </summary>
[DataField("unobstructedRequired")]
public bool UnobstructedRequired = false;
}