From 27eea5399388d372eade14b6fc08b3edf6f858ab Mon Sep 17 00:00:00 2001 From: metalgearsloth Date: Mon, 24 Jun 2024 17:16:15 +1000 Subject: [PATCH 1/2] Network BaseEmitSoundComponent --- .../Components/BaseEmitSoundComponent.cs | 24 +++++++++---------- 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/Content.Shared/Sound/Components/BaseEmitSoundComponent.cs b/Content.Shared/Sound/Components/BaseEmitSoundComponent.cs index f9976219079067..0a8fbd269219bf 100644 --- a/Content.Shared/Sound/Components/BaseEmitSoundComponent.cs +++ b/Content.Shared/Sound/Components/BaseEmitSoundComponent.cs @@ -1,17 +1,17 @@ using Robust.Shared.Audio; -namespace Content.Shared.Sound.Components +namespace Content.Shared.Sound.Components; + +/// +/// Base sound emitter which defines most of the data fields. +/// Accepts both single sounds and sound collections. +/// +public abstract partial class BaseEmitSoundComponent : Component { - /// - /// Base sound emitter which defines most of the data fields. - /// Accepts both single sounds and sound collections. - /// - public abstract partial class BaseEmitSoundComponent : Component - { - public static readonly AudioParams DefaultParams = AudioParams.Default.WithVolume(-2f); + public static readonly AudioParams DefaultParams = AudioParams.Default.WithVolume(-2f); - [ViewVariables(VVAccess.ReadWrite)] - [DataField("sound", required: true)] - public SoundSpecifier? Sound; - } + [AutoNetworkedField] + [ViewVariables(VVAccess.ReadWrite)] + [DataField("sound", required: true)] + public SoundSpecifier? Sound; } From e8da2b25b172e8cb103de55fda8e19934fc61178 Mon Sep 17 00:00:00 2001 From: metalgearsloth Date: Mon, 24 Jun 2024 17:17:09 +1000 Subject: [PATCH 2/2] high intelligence --- Content.Shared/Sound/Components/BaseEmitSoundComponent.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Content.Shared/Sound/Components/BaseEmitSoundComponent.cs b/Content.Shared/Sound/Components/BaseEmitSoundComponent.cs index 0a8fbd269219bf..4e6ebb23d21644 100644 --- a/Content.Shared/Sound/Components/BaseEmitSoundComponent.cs +++ b/Content.Shared/Sound/Components/BaseEmitSoundComponent.cs @@ -12,6 +12,6 @@ public abstract partial class BaseEmitSoundComponent : Component [AutoNetworkedField] [ViewVariables(VVAccess.ReadWrite)] - [DataField("sound", required: true)] + [DataField(required: true)] public SoundSpecifier? Sound; }