diff --git a/Content.Server/GameObjects/Components/Sound/EmitSoundOnUseComponent.cs b/Content.Server/GameObjects/Components/Sound/EmitSoundOnUseComponent.cs index 0d01ce2bb9..b1f466f136 100644 --- a/Content.Server/GameObjects/Components/Sound/EmitSoundOnUseComponent.cs +++ b/Content.Server/GameObjects/Components/Sound/EmitSoundOnUseComponent.cs @@ -1,7 +1,9 @@ using Content.Server.GameObjects.EntitySystems; using Content.Shared.Audio; +using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.Audio; using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Systems; using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components.Sound @@ -32,10 +34,10 @@ namespace Content.Server.GameObjects.Components.Sound { if (_pitchVariation > 0.0) { - Owner.GetComponent().Play(_soundName, AudioHelpers.WithVariation(_pitchVariation).WithVolume(-2f)); + EntitySystem.Get().Play(_soundName, Owner, AudioHelpers.WithVariation(_pitchVariation).WithVolume(-2f)); return true; } - Owner.GetComponent().Play(_soundName, AudioParams.Default.WithVolume(-2f)); + EntitySystem.Get().Play(_soundName, Owner, AudioParams.Default.WithVolume(-2f)); return true; } return false; diff --git a/Resources/Prototypes/Entities/Items/bike_horn.yml b/Resources/Prototypes/Entities/Items/bike_horn.yml index 8314634c1c..42101afb02 100644 --- a/Resources/Prototypes/Entities/Items/bike_horn.yml +++ b/Resources/Prototypes/Entities/Items/bike_horn.yml @@ -17,7 +17,6 @@ sprite: Objects/Fun/bikehorn.rsi - type: ItemCooldown - - type: Sound - type: EmitSoundOnUse sound: /Audio/items/bikehorn.ogg variation: 0.2