From 2df203b1e47f51b517b3f1c744e91fa76921702d Mon Sep 17 00:00:00 2001 From: Kara Date: Sun, 3 Jul 2022 01:36:40 -0700 Subject: [PATCH] Intrinsic radio fixes (#9378) * Inherent radio fixes * rename --- ...Component.cs => IntrinsicRadioComponent.cs} | 18 +++--------------- Resources/Prototypes/Body/Parts/skeleton.yml | 6 ++++-- .../Entities/Mobs/Player/observer.yml | 13 ++++++++++++- .../Prototypes/Entities/Objects/Fun/pai.yml | 4 +++- 4 files changed, 22 insertions(+), 19 deletions(-) rename Content.Server/Ghost/Components/{GhostRadioComponent.cs => IntrinsicRadioComponent.cs} (80%) diff --git a/Content.Server/Ghost/Components/GhostRadioComponent.cs b/Content.Server/Ghost/Components/IntrinsicRadioComponent.cs similarity index 80% rename from Content.Server/Ghost/Components/GhostRadioComponent.cs rename to Content.Server/Ghost/Components/IntrinsicRadioComponent.cs index e43fbb3764..95310079d1 100644 --- a/Content.Server/Ghost/Components/GhostRadioComponent.cs +++ b/Content.Server/Ghost/Components/IntrinsicRadioComponent.cs @@ -12,26 +12,14 @@ namespace Content.Server.Ghost.Components /// [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))] - private HashSet _channels = new() - { - "Common", - "Command", - "CentCom", - "Engineering", - "Medical", - "Science", - "Security", - "Service", - "Supply", - "Syndicate" - }; + [DataField("channels", customTypeSerializer: typeof(PrototypeIdHashSetSerializer), required: true)] + private HashSet _channels = new(); public void Receive(string message, RadioChannelPrototype channel, EntityUid speaker) { diff --git a/Resources/Prototypes/Body/Parts/skeleton.yml b/Resources/Prototypes/Body/Parts/skeleton.yml index f40ed648c5..f25740935e 100644 --- a/Resources/Prototypes/Body/Parts/skeleton.yml +++ b/Resources/Prototypes/Body/Parts/skeleton.yml @@ -61,7 +61,9 @@ attributes: proper: true - type: Examiner - - type: GhostRadio + - type: IntrinsicRadio + channels: + - Common - type: DoAfter - type: Actions - type: MobState @@ -70,7 +72,7 @@ # criticalThreshold: 50 # deadThreshold: 120 - + - type: entity id: LeftArmSkeleton diff --git a/Resources/Prototypes/Entities/Mobs/Player/observer.yml b/Resources/Prototypes/Entities/Mobs/Player/observer.yml index 84ee0ab7f4..a479b6b6cb 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/observer.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/observer.yml @@ -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 diff --git a/Resources/Prototypes/Entities/Objects/Fun/pai.yml b/Resources/Prototypes/Entities/Objects/Fun/pai.yml index 3265295dfd..f5f8f4a774 100644 --- a/Resources/Prototypes/Entities/Objects/Fun/pai.yml +++ b/Resources/Prototypes/Entities/Objects/Fun/pai.yml @@ -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