Intrinsic radio fixes (#9378)

* Inherent radio fixes

* rename
This commit is contained in:
Kara
2022-07-03 01:36:40 -07:00
committed by GitHub
parent c5e2752a06
commit 2df203b1e4
4 changed files with 22 additions and 19 deletions

View File

@@ -12,26 +12,14 @@ namespace Content.Server.Ghost.Components
/// </summary>
[RegisterComponent]
[ComponentReference(typeof(IRadio))]
public sealed class GhostRadioComponent : Component, IRadio
public sealed class IntrinsicRadioComponent : Component, IRadio
{
// TODO: This class is yuck
[Dependency] private readonly IServerNetManager _netManager = default!;
[Dependency] private readonly IEntityManager _entMan = default!;
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>))]
private HashSet<string> _channels = new()
{
"Common",
"Command",
"CentCom",
"Engineering",
"Medical",
"Science",
"Security",
"Service",
"Supply",
"Syndicate"
};
[DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer<RadioChannelPrototype>), required: true)]
private HashSet<string> _channels = new();
public void Receive(string message, RadioChannelPrototype channel, EntityUid speaker)
{

View File

@@ -61,7 +61,9 @@
attributes:
proper: true
- type: Examiner
- type: GhostRadio
- type: IntrinsicRadio
channels:
- Common
- type: DoAfter
- type: Actions
- type: MobState

View File

@@ -29,7 +29,18 @@
- type: Examiner
DoRangeCheck: false
- type: Ghost
- type: GhostRadio
- type: IntrinsicRadio
channels:
- Common
- Command
- CentCom
- Engineering
- Medical
- Science
- Security
- Service
- Supply
- Syndicate
- type: Sprite
overrideContainerOcclusion: true # Ghosts always show up regardless of where they're contained.
netsync: false

View File

@@ -33,7 +33,9 @@
event: !type:OpenUiActionEvent
key: enum.InstrumentUiKey.Key
- type: Examiner
- type: GhostRadio
- type: IntrinsicRadio
channels:
- Common
- type: DoAfter
- type: Actions
- type: TypingIndicator