diff --git a/Content.Server/Interaction/Components/EmitSoundOnUseComponent.cs b/Content.Server/Interaction/Components/EmitSoundOnUseComponent.cs index c4f2070b78..a90eef8d76 100644 --- a/Content.Server/Interaction/Components/EmitSoundOnUseComponent.cs +++ b/Content.Server/Interaction/Components/EmitSoundOnUseComponent.cs @@ -1,4 +1,4 @@ -using Content.Server.Sound; +using Content.Server.Sound.Components; using Robust.Shared.GameObjects; namespace Content.Server.Interaction.Components diff --git a/Content.Server/Light/Components/ExpendableLightComponent.cs b/Content.Server/Light/Components/ExpendableLightComponent.cs index 0e8be41061..1f1c4a9df5 100644 --- a/Content.Server/Light/Components/ExpendableLightComponent.cs +++ b/Content.Server/Light/Components/ExpendableLightComponent.cs @@ -1,6 +1,6 @@ using Content.Server.Clothing.Components; using Content.Server.Items; -using Content.Server.Sound; +using Content.Server.Sound.Components; using Content.Shared.ActionBlocker; using Content.Shared.Interaction; using Content.Shared.Interaction.Events; diff --git a/Content.Server/Sound/BaseEmitSoundComponent.cs b/Content.Server/Sound/Components/BaseEmitSoundComponent.cs similarity index 95% rename from Content.Server/Sound/BaseEmitSoundComponent.cs rename to Content.Server/Sound/Components/BaseEmitSoundComponent.cs index 3e2aa8f976..dc68cca91f 100644 --- a/Content.Server/Sound/BaseEmitSoundComponent.cs +++ b/Content.Server/Sound/Components/BaseEmitSoundComponent.cs @@ -2,7 +2,7 @@ using Robust.Shared.GameObjects; using Robust.Shared.Serialization.Manager.Attributes; using Robust.Shared.ViewVariables; -namespace Content.Server.Sound +namespace Content.Server.Sound.Components { /// /// Base sound emitter which defines most of the data fields. diff --git a/Content.Server/Sound/EmitSoundOnActivateComponent.cs b/Content.Server/Sound/Components/EmitSoundOnActivateComponent.cs similarity index 88% rename from Content.Server/Sound/EmitSoundOnActivateComponent.cs rename to Content.Server/Sound/Components/EmitSoundOnActivateComponent.cs index fdbb9f7aed..2cbc83516a 100644 --- a/Content.Server/Sound/EmitSoundOnActivateComponent.cs +++ b/Content.Server/Sound/Components/EmitSoundOnActivateComponent.cs @@ -1,6 +1,6 @@ using Robust.Shared.GameObjects; -namespace Content.Server.Sound +namespace Content.Server.Sound.Components { /// /// Simple sound emitter that emits sound on ActivateInWorld diff --git a/Content.Server/Sound/EmitSoundOnLandComponent.cs b/Content.Server/Sound/Components/EmitSoundOnLandComponent.cs similarity index 88% rename from Content.Server/Sound/EmitSoundOnLandComponent.cs rename to Content.Server/Sound/Components/EmitSoundOnLandComponent.cs index 1d6286abdd..96782fe985 100644 --- a/Content.Server/Sound/EmitSoundOnLandComponent.cs +++ b/Content.Server/Sound/Components/EmitSoundOnLandComponent.cs @@ -1,6 +1,6 @@ using Robust.Shared.GameObjects; -namespace Content.Server.Sound +namespace Content.Server.Sound.Components { /// /// Simple sound emitter that emits sound on LandEvent diff --git a/Content.Server/Sound/LoopingLoopingSoundComponent.cs b/Content.Server/Sound/Components/LoopingLoopingSoundComponent.cs similarity index 98% rename from Content.Server/Sound/LoopingLoopingSoundComponent.cs rename to Content.Server/Sound/Components/LoopingLoopingSoundComponent.cs index 38796fe874..4230e39d8e 100644 --- a/Content.Server/Sound/LoopingLoopingSoundComponent.cs +++ b/Content.Server/Sound/Components/LoopingLoopingSoundComponent.cs @@ -3,7 +3,7 @@ using Robust.Shared.Audio; using Robust.Shared.GameObjects; using Robust.Shared.Network; -namespace Content.Server.Sound +namespace Content.Server.Sound.Components { [RegisterComponent] public class LoopingLoopingSoundComponent : SharedLoopingSoundComponent diff --git a/Content.Server/Sound/EmitSoundSystem.cs b/Content.Server/Sound/EmitSoundSystem.cs index ad653c780a..0e777cf5a5 100644 --- a/Content.Server/Sound/EmitSoundSystem.cs +++ b/Content.Server/Sound/EmitSoundSystem.cs @@ -2,6 +2,7 @@ using Content.Shared.Audio; using Content.Shared.Interaction; using Content.Shared.Throwing; using Content.Server.Interaction.Components; +using Content.Server.Sound.Components; using Content.Server.Throwing; using JetBrains.Annotations; using Robust.Shared.Audio; diff --git a/Content.Server/Throwing/EmitSoundOnThrowComponent.cs b/Content.Server/Throwing/EmitSoundOnThrowComponent.cs index d56af69811..d0b75d8d2b 100644 --- a/Content.Server/Throwing/EmitSoundOnThrowComponent.cs +++ b/Content.Server/Throwing/EmitSoundOnThrowComponent.cs @@ -1,4 +1,4 @@ -using Content.Server.Sound; +using Content.Server.Sound.Components; using Robust.Shared.GameObjects; namespace Content.Server.Throwing diff --git a/Content.Server/Toys/ToysComponent.cs b/Content.Server/Toys/ToysComponent.cs deleted file mode 100644 index e8deeee074..0000000000 --- a/Content.Server/Toys/ToysComponent.cs +++ /dev/null @@ -1,59 +0,0 @@ -using Content.Shared.Audio; -using Content.Shared.Interaction; -using Content.Shared.Throwing; -using Robust.Shared.Audio; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Player; -using Robust.Shared.Prototypes; -using Robust.Shared.Random; -using Robust.Shared.Serialization.Manager.Attributes; -using Robust.Shared.ViewVariables; - -namespace Content.Server.Toys -{ - [RegisterComponent] - public class ToysComponent : Component, IActivate, IUse, ILand - { - [Dependency] private readonly IPrototypeManager _prototypeManager = default!; - [Dependency] private readonly IRobustRandom _random = default!; - - public override string Name => "Toys"; - - [ViewVariables] - [DataField("toySqueak")] - public string _soundCollectionName = "ToySqueak"; - - public void Squeak() - { - PlaySqueakEffect(); - } - - public void PlaySqueakEffect() - { - if (!string.IsNullOrWhiteSpace(_soundCollectionName)) - { - var soundCollection = _prototypeManager.Index(_soundCollectionName); - var file = _random.Pick(soundCollection.PickFiles); - SoundSystem.Play(Filter.Pvs(Owner), file, Owner, AudioParams.Default); - } - } - - void IActivate.Activate(ActivateEventArgs eventArgs) - { - Squeak(); - } - - bool IUse.UseEntity(UseEntityEventArgs eventArgs) - { - Squeak(); - return false; - } - - void ILand.Land(LandEventArgs eventArgs) - { - Squeak(); - } - } -} -