]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Network BaseEmitSoundComponent (#29400)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Mon, 24 Jun 2024 09:55:28 +0000 (19:55 +1000)
committerGitHub <noreply@github.com>
Mon, 24 Jun 2024 09:55:28 +0000 (19:55 +1000)
* Network BaseEmitSoundComponent

* high intelligence

Content.Shared/Sound/Components/BaseEmitSoundComponent.cs

index f9976219079067f4bda60c4cd59d9ad193a23515..4e6ebb23d21644d39a3c59e92d13911850920031 100644 (file)
@@ -1,17 +1,17 @@
 using Robust.Shared.Audio;
 
-namespace Content.Shared.Sound.Components
+namespace Content.Shared.Sound.Components;
+
+/// <summary>
+/// Base sound emitter which defines most of the data fields.
+/// Accepts both single sounds and sound collections.
+/// </summary>
+public abstract partial class BaseEmitSoundComponent : Component
 {
-    /// <summary>
-    /// Base sound emitter which defines most of the data fields.
-    /// Accepts both single sounds and sound collections.
-    /// </summary>
-    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(required: true)]
+    public SoundSpecifier? Sound;
 }