From f7b1bda3e5d4b99295effa4d52b07f872a21af69 Mon Sep 17 00:00:00 2001 From: keronshb <54602815+keronshb@users.noreply.github.com> Date: Sun, 12 Jun 2022 19:45:47 -0400 Subject: [PATCH] Reorders Sound Systems signatures to match Popup Systems. (#8728) --- Content.Client/Actions/ActionsSystem.cs | 2 +- Content.Client/Administration/BwoinkSystem.cs | 2 +- Content.Client/Audio/AmbientSoundSystem.cs | 6 ++---- Content.Client/Audio/BackgroundAudioSystem.cs | 4 ++-- .../Audio/ClientAdminSoundSystem.cs | 2 +- Content.Client/Doors/DoorSystem.cs | 2 +- .../GameTicking/Managers/ClientGameTicker.cs | 2 +- .../Kitchen/EntitySystems/MicrowaveSystem.cs | 4 ++-- .../Visualizers/ExpendableLightVisualizer.cs | 5 ++--- Content.Client/Voting/VoteManager.cs | 2 +- .../Ranged/Systems/FlyBySoundSystem.cs | 2 +- .../Weapons/Ranged/Systems/GunSystem.cs | 2 +- Content.Server/AME/AntimatterEngineSystem.cs | 2 +- .../AME/Components/AMEControllerComponent.cs | 4 ++-- .../AirlockPainter/AirlockPainterSystem.cs | 2 +- Content.Server/AlertLevel/AlertLevelSystem.cs | 2 +- .../Components/SpaceVillainArcadeComponent.cs | 14 ++++++------- .../Atmos/Components/GasTankComponent.cs | 6 +++--- .../AtmosphereSystem.HighPressureDelta.cs | 4 ++-- .../EntitySystems/AtmosphereSystem.Hotspot.cs | 4 ++-- .../Monitor/Systems/AtmosMonitoringSystem.cs | 2 +- .../Binary/EntitySystems/GasValveSystem.cs | 2 +- Content.Server/Bible/BibleSystem.cs | 8 ++++---- .../Body/Components/BodyComponent.cs | 2 +- .../Body/Systems/BloodstreamSystem.cs | 4 ++-- .../Botany/Systems/PlantHolderSystem.cs | 4 ++-- .../Buckle/Components/BuckleComponent.cs | 4 ++-- Content.Server/Cabinet/ItemCabinetSystem.cs | 2 +- .../Cargo/Components/CargoConsoleComponent.cs | 4 ++-- .../Cargo/Systems/CargoSystem.Telepad.cs | 2 +- Content.Server/Chat/ChatSystem.cs | 4 ++-- .../Components/ChemMasterComponent.cs | 2 +- .../Components/HyposprayComponent.cs | 2 +- .../Components/ReagentDispenserComponent.cs | 2 +- .../EntitySystems/ChemicalReactionSystem.cs | 2 +- .../ReactionEffects/AreaReactionEffect.cs | 2 +- .../ReactionEffects/FoamAreaReactionEffect.cs | 2 +- .../Cloning/Components/CloningPodComponent.cs | 2 +- Content.Server/CombatMode/CombatModeSystem.cs | 4 ++-- .../Construction/Completions/PlaySound.cs | 2 +- Content.Server/Crayon/CrayonSystem.cs | 2 +- .../Cuffs/Components/CuffableComponent.cs | 6 +++--- .../Cuffs/Components/HandcuffComponent.cs | 4 ++-- .../Systems/DamageOnHighSpeedImpactSystem.cs | 2 +- .../Thresholds/Behaviors/PlaySoundBehavior.cs | 2 +- .../Systems/NetworkConfiguratorSystem.cs | 2 +- Content.Server/Dice/DiceSystem.cs | 2 +- .../Disease/DiseaseDiagnosisSystem.cs | 4 ++-- .../Disease/Effects/DiseaseSnough.cs | 2 +- .../Components/DisposalRouterComponent.cs | 2 +- .../Components/DisposalTaggerComponent.cs | 2 +- .../Disposal/Tube/DisposalTubeSystem.cs | 2 +- .../Unit/EntitySystems/DisposalUnitSystem.cs | 2 +- .../Doors/Components/AirlockComponent.cs | 2 +- Content.Server/Doors/Systems/DoorSystem.cs | 2 +- .../Electrocution/ElectrocutionSystem.cs | 2 +- .../EntitySystems/ExplosionSystem.cs | 2 +- .../Explosion/EntitySystems/TriggerSystem.cs | 2 +- .../Extinguisher/FireExtinguisherSystem.cs | 6 +++--- Content.Server/Flash/FlashSystem.cs | 4 ++-- .../Fluids/EntitySystems/MoppingSystem.cs | 4 ++-- .../Fluids/EntitySystems/PuddleSystem.cs | 4 ++-- .../Fluids/EntitySystems/SpraySystem.cs | 2 +- .../GameTicking/GameTicker.RoundFlow.cs | 2 +- .../GameTicking/Rules/SuspicionRuleSystem.cs | 2 +- .../GameTicking/Rules/TraitorRuleSystem.cs | 2 +- Content.Server/Gatherable/GatherableSystem.cs | 2 +- .../EntitySystems/GravityShakeSystem.cs | 6 ++---- Content.Server/Guardian/GuardianSystem.cs | 6 +++--- .../ImmovableRod/ImmovableRodSystem.cs | 2 +- .../Interaction/InteractionPopupSystem.cs | 4 ++-- .../Kitchen/Components/MicrowaveComponent.cs | 10 +++++----- .../EntitySystems/KitchenSpikeSystem.cs | 2 +- .../EntitySystems/ReagentGrinderSystem.cs | 6 +++--- Content.Server/Lathe/LatheSystem.cs | 4 ++-- .../EntitySystems/ExpendableLightSystem.cs | 4 ++-- .../EntitySystems/HandheldLightSystem.cs | 8 ++++---- .../Light/EntitySystems/LightBulbSystem.cs | 2 +- .../EntitySystems/LightReplacerSystem.cs | 4 ++-- .../Light/EntitySystems/MatchstickSystem.cs | 5 ++--- .../Light/EntitySystems/PoweredLightSystem.cs | 4 ++-- .../UnpoweredFlashlightSystem.cs | 2 +- Content.Server/Lock/LockSystem.cs | 6 +++--- Content.Server/Magic/MagicSystem.cs | 4 ++-- Content.Server/Medical/HealingSystem.cs | 4 ++-- Content.Server/Medical/VomitSystem.cs | 2 +- .../CrematoriumEntityStorageComponent.cs | 6 +++--- .../MorgueEntityStorageComponent.cs | 2 +- Content.Server/Nuke/NukeSystem.cs | 10 +++++----- .../Nutrition/EntitySystems/CreamPieSystem.cs | 2 +- .../Nutrition/EntitySystems/DrinkSystem.cs | 6 +++--- .../Nutrition/EntitySystems/FoodSystem.cs | 4 ++-- .../EntitySystems/SliceableFoodSystem.cs | 4 ++-- .../Nutrition/EntitySystems/UtensilSystem.cs | 2 +- Content.Server/PDA/Ringer/RingerSystem.cs | 6 ++---- .../Plants/Systems/PottedPlantHideSystem.cs | 2 +- .../PneumaticCannon/PneumaticCannonSystem.cs | 8 ++++---- .../Power/EntitySystems/ApcSystem.cs | 2 +- Content.Server/RCD/Systems/RCDSystem.cs | 4 ++-- .../Radiation/RadiationPulseComponent.cs | 2 +- Content.Server/Recycling/RecyclerSystem.cs | 2 +- Content.Server/Remotes/DoorRemoteSystem.cs | 2 +- Content.Server/RoundEnd/RoundEndSystem.cs | 4 ++-- .../Components/ServerSingularityComponent.cs | 4 ++-- .../EntitySystems/EmitterSystem.cs | 4 ++-- Content.Server/Slippery/SlipperySystem.cs | 2 +- Content.Server/Sound/EmitSoundSystem.cs | 2 +- Content.Server/Speech/SpeechNoiseSystem.cs | 2 +- Content.Server/Speech/VocalSystem.cs | 6 +++--- .../StationEvents/Events/GasLeak.cs | 4 ++-- .../StationEvents/Events/PowerGridCheck.cs | 2 +- .../StationEvents/Events/StationEvent.cs | 4 ++-- .../CursedEntityStorageComponent.cs | 4 ++-- .../Components/EntityStorageComponent.cs | 4 ++-- .../EntitySystems/SpawnItemsOnUseSystem.cs | 2 +- .../Storage/EntitySystems/StorageSystem.cs | 12 +++++------ Content.Server/Stunnable/StunSystem.cs | 2 +- Content.Server/Stunnable/StunbatonSystem.cs | 10 +++++----- Content.Server/Tiles/FloorTileSystem.cs | 2 +- Content.Server/Toilet/ToiletSystem.cs | 4 ++-- .../Tools/ToolSystem.MultipleTool.cs | 2 +- Content.Server/Tools/ToolSystem.Welder.cs | 6 +++--- Content.Server/Tools/ToolSystem.cs | 4 ++-- Content.Server/Traitor/Uplink/UplinkSystem.cs | 12 +++++------ Content.Server/Vehicle/HonkSystem.cs | 4 ++-- .../VendingMachines/VendingMachineSystem.cs | 4 ++-- .../Melee/EnergySword/EnergySwordSystem.cs | 4 ++-- .../Weapon/Melee/MeleeWeaponSystem.cs | 20 +++++++++---------- .../Weapon/Ranged/Systems/GunSystem.cs | 16 ++++++--------- Content.Server/Wieldable/WieldableSystem.cs | 5 ++--- Content.Server/Wires/WiresSystem.cs | 6 +++--- Content.Shared/Actions/SharedActionsSystem.cs | 2 +- .../Containers/ItemSlot/ItemSlotsSystem.cs | 2 +- .../Inventory/InventorySystem.Equip.cs | 4 ++-- .../Movement/SharedMoverController.cs | 6 ++---- .../Standing/StandingStateSystem.cs | 2 +- Content.Shared/Stunnable/SharedStunSystem.cs | 2 +- .../Weapons/Ranged/Systems/SharedGunSystem.cs | 2 +- 138 files changed, 257 insertions(+), 272 deletions(-) diff --git a/Content.Client/Actions/ActionsSystem.cs b/Content.Client/Actions/ActionsSystem.cs index fef0f5805b..fd83840cd8 100644 --- a/Content.Client/Actions/ActionsSystem.cs +++ b/Content.Client/Actions/ActionsSystem.cs @@ -527,7 +527,7 @@ namespace Content.Client.Actions } if (action.Sound != null) - SoundSystem.Play(Filter.Local(), action.Sound.GetSound(), user, action.AudioParams); + SoundSystem.Play(action.Sound.GetSound(), Filter.Local(), user, action.AudioParams); return performedAction; } diff --git a/Content.Client/Administration/BwoinkSystem.cs b/Content.Client/Administration/BwoinkSystem.cs index 87eb24b6d9..c04b5fdfd3 100644 --- a/Content.Client/Administration/BwoinkSystem.cs +++ b/Content.Client/Administration/BwoinkSystem.cs @@ -45,7 +45,7 @@ namespace Content.Client.Administration var localPlayer = _playerManager.LocalPlayer; if (localPlayer?.UserId != message.TrueSender) { - SoundSystem.Play(Filter.Local(), "/Audio/Effects/adminhelp.ogg"); + SoundSystem.Play("/Audio/Effects/adminhelp.ogg", Filter.Local()); _clyde.RequestWindowAttention(); } diff --git a/Content.Client/Audio/AmbientSoundSystem.cs b/Content.Client/Audio/AmbientSoundSystem.cs index fa1630b012..2856fb8a30 100644 --- a/Content.Client/Audio/AmbientSoundSystem.cs +++ b/Content.Client/Audio/AmbientSoundSystem.cs @@ -259,11 +259,9 @@ namespace Content.Client.Audio .WithPlayOffset(_random.NextFloat(0.0f, 100.0f)) .WithMaxDistance(comp.Range); - var stream = SoundSystem.Play( + var stream = SoundSystem.Play(sound, Filter.Local(), - sound, - comp.Owner, - audioParams); + comp.Owner, audioParams); if (stream == null) continue; diff --git a/Content.Client/Audio/BackgroundAudioSystem.cs b/Content.Client/Audio/BackgroundAudioSystem.cs index 1e6fca9c14..e1890b5698 100644 --- a/Content.Client/Audio/BackgroundAudioSystem.cs +++ b/Content.Client/Audio/BackgroundAudioSystem.cs @@ -169,7 +169,7 @@ namespace Content.Client.Audio EndAmbience(); if (!CanPlayCollection(_currentCollection)) return; var file = _robustRandom.Pick(_currentCollection.PickFiles).ToString(); - _ambientStream = SoundSystem.Play(Filter.Local(), file, _ambientParams.WithVolume(_ambientParams.Volume + _configManager.GetCVar(CCVars.AmbienceVolume))); + _ambientStream = SoundSystem.Play(file, Filter.Local(), _ambientParams.WithVolume(_ambientParams.Volume + _configManager.GetCVar(CCVars.AmbienceVolume))); } private void EndAmbience() @@ -255,7 +255,7 @@ namespace Content.Client.Audio { return; } - _lobbyStream = SoundSystem.Play(Filter.Local(), file, _lobbyParams); + _lobbyStream = SoundSystem.Play(file, Filter.Local(), _lobbyParams); } private void EndLobbyMusic() diff --git a/Content.Client/Audio/ClientAdminSoundSystem.cs b/Content.Client/Audio/ClientAdminSoundSystem.cs index ce1477a35f..bc576c7384 100644 --- a/Content.Client/Audio/ClientAdminSoundSystem.cs +++ b/Content.Client/Audio/ClientAdminSoundSystem.cs @@ -34,7 +34,7 @@ public sealed class ClientAdminSoundSystem : SharedAdminSoundSystem { if(!_adminAudioEnabled) return; - var stream = SoundSystem.Play(Filter.Local(), soundEvent.Filename, soundEvent.AudioParams); + var stream = SoundSystem.Play(soundEvent.Filename, Filter.Local(), soundEvent.AudioParams); _adminAudio.Add(stream); } diff --git a/Content.Client/Doors/DoorSystem.cs b/Content.Client/Doors/DoorSystem.cs index be8514ba1d..398d01e578 100644 --- a/Content.Client/Doors/DoorSystem.cs +++ b/Content.Client/Doors/DoorSystem.cs @@ -30,6 +30,6 @@ public sealed class DoorSystem : SharedDoorSystem protected override void PlaySound(EntityUid uid, string sound, AudioParams audioParams, EntityUid? predictingPlayer, bool predicted) { if (GameTiming.InPrediction && GameTiming.IsFirstTimePredicted) - SoundSystem.Play(Filter.Local(), sound, uid, audioParams); + SoundSystem.Play(sound, Filter.Local(), uid, audioParams); } } diff --git a/Content.Client/GameTicking/Managers/ClientGameTicker.cs b/Content.Client/GameTicking/Managers/ClientGameTicker.cs index 518177458b..55df4d5f34 100644 --- a/Content.Client/GameTicking/Managers/ClientGameTicker.cs +++ b/Content.Client/GameTicking/Managers/ClientGameTicker.cs @@ -143,7 +143,7 @@ namespace Content.Client.GameTicking.Managers if (string.IsNullOrEmpty(RestartSound)) return; - SoundSystem.Play(Filter.Empty(), RestartSound); + SoundSystem.Play(RestartSound, Filter.Empty()); // Cleanup the sound, we only want it to play when the round restarts after it ends normally. RestartSound = null; diff --git a/Content.Client/Kitchen/EntitySystems/MicrowaveSystem.cs b/Content.Client/Kitchen/EntitySystems/MicrowaveSystem.cs index c89a85ed34..16e8579840 100644 --- a/Content.Client/Kitchen/EntitySystems/MicrowaveSystem.cs +++ b/Content.Client/Kitchen/EntitySystems/MicrowaveSystem.cs @@ -12,8 +12,8 @@ namespace Content.Client.Kitchen.EntitySystems { StopSoundLoop(microwave); - microwave.PlayingStream = SoundSystem.Play(Filter.Local(), microwave.LoopingSound.GetSound(), microwave.Owner, - AudioParams.Default.WithMaxDistance(5).WithLoop(true)); + microwave.PlayingStream = SoundSystem.Play(microwave.LoopingSound.GetSound(), Filter.Local(), + microwave.Owner, AudioParams.Default.WithMaxDistance(5).WithLoop(true)); } public void StopSoundLoop(MicrowaveComponent microwave) diff --git a/Content.Client/Light/Visualizers/ExpendableLightVisualizer.cs b/Content.Client/Light/Visualizers/ExpendableLightVisualizer.cs index 85e47706ce..da317f5a2c 100644 --- a/Content.Client/Light/Visualizers/ExpendableLightVisualizer.cs +++ b/Content.Client/Light/Visualizers/ExpendableLightVisualizer.cs @@ -49,9 +49,8 @@ namespace Content.Client.Light.Visualizers TryStopStream(expendableLight.PlayingStream); if (expendableLight.LoopedSound != null) { - expendableLight.PlayingStream = SoundSystem.Play(Filter.Local(), - expendableLight.LoopedSound, expendableLight.Owner, - SharedExpendableLightComponent.LoopedSoundParams.WithLoop(true)); + expendableLight.PlayingStream = SoundSystem.Play(expendableLight.LoopedSound, Filter.Local(), + expendableLight.Owner, SharedExpendableLightComponent.LoopedSoundParams.WithLoop(true)); } break; } diff --git a/Content.Client/Voting/VoteManager.cs b/Content.Client/Voting/VoteManager.cs index 3f3ef9f5f0..12fbedab9f 100644 --- a/Content.Client/Voting/VoteManager.cs +++ b/Content.Client/Voting/VoteManager.cs @@ -117,7 +117,7 @@ namespace Content.Client.Voting } @new = true; - SoundSystem.Play(Filter.Local(), "/Audio/Effects/voteding.ogg"); + SoundSystem.Play("/Audio/Effects/voteding.ogg", Filter.Local()); // New vote from the server. var vote = new ActiveVote(voteId) diff --git a/Content.Client/Weapons/Ranged/Systems/FlyBySoundSystem.cs b/Content.Client/Weapons/Ranged/Systems/FlyBySoundSystem.cs index da9184a3c3..c37acf365d 100644 --- a/Content.Client/Weapons/Ranged/Systems/FlyBySoundSystem.cs +++ b/Content.Client/Weapons/Ranged/Systems/FlyBySoundSystem.cs @@ -33,6 +33,6 @@ public sealed class FlyBySoundSystem : SharedFlyBySoundSystem if (args.OurFixture.ID != FlyByFixture || !_random.Prob(component.Prob)) return; - SoundSystem.Play(Filter.Local(), component.Sound.GetSound(), uid, component.Sound.Params); + SoundSystem.Play(component.Sound.GetSound(), Filter.Local(), uid, component.Sound.Params); } } diff --git a/Content.Client/Weapons/Ranged/Systems/GunSystem.cs b/Content.Client/Weapons/Ranged/Systems/GunSystem.cs index 8ea7f0906a..b3a4ba4652 100644 --- a/Content.Client/Weapons/Ranged/Systems/GunSystem.cs +++ b/Content.Client/Weapons/Ranged/Systems/GunSystem.cs @@ -205,7 +205,7 @@ public sealed partial class GunSystem : SharedGunSystem protected override void PlaySound(EntityUid gun, string? sound, EntityUid? user = null) { if (sound == null || user == null || !Timing.IsFirstTimePredicted) return; - SoundSystem.Play(Filter.Local(), sound, gun); + SoundSystem.Play(sound, Filter.Local(), gun); } protected override void Popup(string message, EntityUid? uid, EntityUid? user) diff --git a/Content.Server/AME/AntimatterEngineSystem.cs b/Content.Server/AME/AntimatterEngineSystem.cs index e0bcbf59c2..7ee3aa7a4f 100644 --- a/Content.Server/AME/AntimatterEngineSystem.cs +++ b/Content.Server/AME/AntimatterEngineSystem.cs @@ -102,7 +102,7 @@ namespace Content.Server.AME var ent = EntityManager.SpawnEntity("AMEShielding", mapGrid.GridTileToLocal(snapPos)); - SoundSystem.Play(Filter.Pvs(uid), component.UnwrapSound.GetSound(), uid); + SoundSystem.Play(component.UnwrapSound.GetSound(), Filter.Pvs(uid), uid); EntityManager.QueueDeleteEntity(uid); } diff --git a/Content.Server/AME/Components/AMEControllerComponent.cs b/Content.Server/AME/Components/AMEControllerComponent.cs index 03ff66d0e0..cf9e01eec9 100644 --- a/Content.Server/AME/Components/AMEControllerComponent.cs +++ b/Content.Server/AME/Components/AMEControllerComponent.cs @@ -262,12 +262,12 @@ namespace Content.Server.AME.Components private void ClickSound() { - SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f)); } private void InjectSound(bool overloading) { - SoundSystem.Play(Filter.Pvs(Owner), _injectSound.GetSound(), Owner, AudioParams.Default.WithVolume(overloading ? 10f : 0f)); + SoundSystem.Play(_injectSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(overloading ? 10f : 0f)); } } diff --git a/Content.Server/AirlockPainter/AirlockPainterSystem.cs b/Content.Server/AirlockPainter/AirlockPainterSystem.cs index feec16588f..8924e54c58 100644 --- a/Content.Server/AirlockPainter/AirlockPainterSystem.cs +++ b/Content.Server/AirlockPainter/AirlockPainterSystem.cs @@ -39,7 +39,7 @@ namespace Content.Server.AirlockPainter if (TryComp(ev.Target, out var appearance) && TryComp(ev.Target, out PaintableAirlockComponent? airlock)) { - SoundSystem.Play(Filter.Pvs(ev.User, entityManager:EntityManager), ev.Component.SpraySound.GetSound(), ev.User); + SoundSystem.Play(ev.Component.SpraySound.GetSound(), Filter.Pvs(ev.User, entityManager:EntityManager), ev.User); appearance.SetData(DoorVisuals.BaseRSI, ev.Sprite); } } diff --git a/Content.Server/AlertLevel/AlertLevelSystem.cs b/Content.Server/AlertLevel/AlertLevelSystem.cs index 955966ed7e..717cef52b9 100644 --- a/Content.Server/AlertLevel/AlertLevelSystem.cs +++ b/Content.Server/AlertLevel/AlertLevelSystem.cs @@ -172,7 +172,7 @@ public sealed class AlertLevelSystem : EntitySystem { if (detail.Sound != null) { - SoundSystem.Play(Filter.Broadcast(), detail.Sound.GetSound()); + SoundSystem.Play(detail.Sound.GetSound(), Filter.Broadcast()); } else { diff --git a/Content.Server/Arcade/Components/SpaceVillainArcadeComponent.cs b/Content.Server/Arcade/Components/SpaceVillainArcadeComponent.cs index 66fcc915a8..aa93383678 100644 --- a/Content.Server/Arcade/Components/SpaceVillainArcadeComponent.cs +++ b/Content.Server/Arcade/Components/SpaceVillainArcadeComponent.cs @@ -94,7 +94,7 @@ namespace Content.Server.Arcade.Components Game?.ExecutePlayerAction(msg.PlayerAction); break; case PlayerAction.NewGame: - SoundSystem.Play(Filter.Pvs(Owner), _newGameSound.GetSound(), Owner, AudioParams.Default.WithVolume(-4f)); + SoundSystem.Play(_newGameSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-4f)); Game = new SpaceVillainGame(this); UserInterface?.SendMessage(Game.GenerateMetaDataMessage()); @@ -200,7 +200,7 @@ namespace Content.Server.Arcade.Components _latestPlayerActionMessage = Loc.GetString("space-villain-game-player-attack-message", ("enemyName", _enemyName), ("attackAmount", attackAmount)); - SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._playerAttackSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); + SoundSystem.Play(_owner._playerAttackSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f)); if (!_owner.EnemyInvincibilityFlag) _enemyHp -= attackAmount; _turtleTracker -= _turtleTracker > 0 ? 1 : 0; @@ -211,7 +211,7 @@ namespace Content.Server.Arcade.Components _latestPlayerActionMessage = Loc.GetString("space-villain-game-player-heal-message", ("magicPointAmount", pointAmount), ("healAmount", healAmount)); - SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._playerHealSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); + SoundSystem.Play(_owner._playerHealSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f)); if (!_owner.PlayerInvincibilityFlag) _playerMp -= pointAmount; _playerHp += healAmount; @@ -220,7 +220,7 @@ namespace Content.Server.Arcade.Components case PlayerAction.Recharge: var chargeAmount = _random.Next(4, 7); _latestPlayerActionMessage = Loc.GetString("space-villain-game-player-recharge-message", ("regainedPoints", chargeAmount)); - SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._playerChargeSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); + SoundSystem.Play(_owner._playerChargeSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f)); _playerMp += chargeAmount; _turtleTracker -= _turtleTracker > 0 ? 1 : 0; break; @@ -254,7 +254,7 @@ namespace Content.Server.Arcade.Components UpdateUi(Loc.GetString("space-villain-game-player-wins-message"), Loc.GetString("space-villain-game-enemy-dies-message", ("enemyName", _enemyName)), true); - SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._winSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); + SoundSystem.Play(_owner._winSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f)); _owner.ProcessWin(); return false; } @@ -267,7 +267,7 @@ namespace Content.Server.Arcade.Components UpdateUi(Loc.GetString("space-villain-game-player-loses-message"), Loc.GetString("space-villain-game-enemy-cheers-message", ("enemyName", _enemyName)), true); - SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._gameOverSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); + SoundSystem.Play(_owner._gameOverSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f)); return false; } if (_enemyHp <= 0 || _enemyMp <= 0) @@ -276,7 +276,7 @@ namespace Content.Server.Arcade.Components UpdateUi(Loc.GetString("space-villain-game-player-loses-message"), Loc.GetString("space-villain-game-enemy-dies-with-player-message ", ("enemyName", _enemyName)), true); - SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._gameOverSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); + SoundSystem.Play(_owner._gameOverSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f)); return false; } diff --git a/Content.Server/Atmos/Components/GasTankComponent.cs b/Content.Server/Atmos/Components/GasTankComponent.cs index 012c9cd3f1..5fa613dacf 100644 --- a/Content.Server/Atmos/Components/GasTankComponent.cs +++ b/Content.Server/Atmos/Components/GasTankComponent.cs @@ -148,7 +148,7 @@ namespace Content.Server.Atmos.Components _connectStream?.Stop(); if (_connectSound != null) - _connectStream = SoundSystem.Play(Filter.Pvs(Owner, entityManager: _entMan), _connectSound.GetSound(), Owner, _connectSound.Params); + _connectStream = SoundSystem.Play(_connectSound.GetSound(), Filter.Pvs(Owner, entityManager: _entMan), Owner, _connectSound.Params); UpdateUserInterface(); } @@ -162,7 +162,7 @@ namespace Content.Server.Atmos.Components _disconnectStream?.Stop(); if (_disconnectSound != null) - _disconnectStream = SoundSystem.Play(Filter.Pvs(Owner, entityManager: _entMan), _disconnectSound.GetSound(), Owner, _disconnectSound.Params); + _disconnectStream = SoundSystem.Play(_disconnectSound.GetSound(), Filter.Pvs(Owner, entityManager: _entMan), Owner, _disconnectSound.Params); UpdateUserInterface(); } @@ -260,7 +260,7 @@ namespace Content.Server.Atmos.Components if(environment != null) atmosphereSystem.Merge(environment, Air); - SoundSystem.Play(Filter.Pvs(Owner), _ruptureSound.GetSound(), _entMan.GetComponent(Owner).Coordinates, AudioHelpers.WithVariation(0.125f)); + SoundSystem.Play(_ruptureSound.GetSound(), Filter.Pvs(Owner), _entMan.GetComponent(Owner).Coordinates, AudioHelpers.WithVariation(0.125f)); _entMan.QueueDeleteEntity(Owner); return; diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs index 80ec1d6cd0..03cc055da0 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs @@ -96,8 +96,8 @@ namespace Content.Server.Atmos.EntitySystems if(_spaceWindSoundCooldown == 0 && !string.IsNullOrEmpty(SpaceWindSound)) { var coordinates = tile.GridIndices.ToEntityCoordinates(tile.GridIndex, _mapManager); - SoundSystem.Play(Filter.Pvs(coordinates), SpaceWindSound, coordinates, - AudioHelpers.WithVariation(0.125f).WithVolume(MathHelper.Clamp(tile.PressureDifference / 10, 10, 100))); + SoundSystem.Play(SpaceWindSound, Filter.Pvs(coordinates), + coordinates, AudioHelpers.WithVariation(0.125f).WithVolume(MathHelper.Clamp(tile.PressureDifference / 10, 10, 100))); } } diff --git a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs index 7d2f1fb74b..763391cdcc 100644 --- a/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs +++ b/Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs @@ -84,8 +84,8 @@ namespace Content.Server.Atmos.EntitySystems // A few details on the audio parameters for fire. // The greater the fire state, the lesser the pitch variation. // The greater the fire state, the greater the volume. - SoundSystem.Play(Filter.Pvs(coordinates), HotspotSound, coordinates, - AudioHelpers.WithVariation(0.15f/tile.Hotspot.State).WithVolume(-5f + 5f * tile.Hotspot.State)); + SoundSystem.Play(HotspotSound, Filter.Pvs(coordinates), + coordinates, AudioHelpers.WithVariation(0.15f/tile.Hotspot.State).WithVolume(-5f + 5f * tile.Hotspot.State)); } if (_hotspotSoundCooldown > HotspotSoundCooldownCycles) diff --git a/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs b/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs index 225663a766..16306673ea 100644 --- a/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs +++ b/Content.Server/Atmos/Monitor/Systems/AtmosMonitoringSystem.cs @@ -352,7 +352,7 @@ namespace Content.Server.Atmos.Monitor.Systems { if (!Resolve(uid, ref monitor)) return; - SoundSystem.Play(Filter.Pvs(uid), monitor.AlarmSound.GetSound(), uid, AudioParams.Default.WithVolume(monitor.AlarmVolume)); + SoundSystem.Play(monitor.AlarmSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(monitor.AlarmVolume)); } /// diff --git a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasValveSystem.cs b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasValveSystem.cs index d6f5fada5b..67625d9f39 100644 --- a/Content.Server/Atmos/Piping/Binary/EntitySystems/GasValveSystem.cs +++ b/Content.Server/Atmos/Piping/Binary/EntitySystems/GasValveSystem.cs @@ -46,7 +46,7 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems private void OnActivate(EntityUid uid, GasValveComponent component, ActivateInWorldEvent args) { Toggle(uid, component); - SoundSystem.Play(Filter.Pvs(component.Owner), component.ValveSound.GetSound(), component.Owner, AudioHelpers.WithVariation(0.25f)); + SoundSystem.Play(component.ValveSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioHelpers.WithVariation(0.25f)); } public void Set(EntityUid uid, GasValveComponent component, bool value) diff --git a/Content.Server/Bible/BibleSystem.cs b/Content.Server/Bible/BibleSystem.cs index e48871e39f..fcb07be9b6 100644 --- a/Content.Server/Bible/BibleSystem.cs +++ b/Content.Server/Bible/BibleSystem.cs @@ -74,7 +74,7 @@ namespace Content.Server.Bible } summonableComp.AlreadySummoned = false; _popupSystem.PopupEntity(Loc.GetString("bible-summon-respawn-ready", ("book", summonableComp.Owner)), summonableComp.Owner, Filter.Pvs(summonableComp.Owner)); - SoundSystem.Play(Filter.Pvs(summonableComp.Owner), "/Audio/Effects/radpulse9.ogg", summonableComp.Owner, AudioParams.Default.WithVolume(-4f)); + SoundSystem.Play("/Audio/Effects/radpulse9.ogg", Filter.Pvs(summonableComp.Owner), summonableComp.Owner, AudioParams.Default.WithVolume(-4f)); /// Clean up the accumulator and respawn tracking component summonableComp.Accumulator = 0; RemQueue.Enqueue(respawning.Owner); @@ -105,7 +105,7 @@ namespace Content.Server.Bible { _popupSystem.PopupEntity(Loc.GetString("bible-sizzle"), args.User, Filter.Entities(args.User)); - SoundSystem.Play(Filter.Pvs(args.User), component.SizzleSoundPath.GetSound(), args.User); + SoundSystem.Play(component.SizzleSoundPath.GetSound(), Filter.Pvs(args.User), args.User); _damageableSystem.TryChangeDamage(args.User, component.DamageOnUntrainedUse, true); return; @@ -122,7 +122,7 @@ namespace Content.Server.Bible var selfFailMessage = Loc.GetString(component.LocPrefix + "-heal-fail-self", ("target", args.Target),("bible", uid)); _popupSystem.PopupEntity(selfFailMessage, args.User, Filter.Entities(args.User)); - SoundSystem.Play(Filter.Pvs(args.Target.Value), "/Audio/Effects/hit_kick.ogg", args.User); + SoundSystem.Play("/Audio/Effects/hit_kick.ogg", Filter.Pvs(args.Target.Value), args.User); _damageableSystem.TryChangeDamage(args.Target.Value, component.DamageOnFail, true); return; } @@ -134,7 +134,7 @@ namespace Content.Server.Bible var selfMessage = Loc.GetString(component.LocPrefix + "-heal-success-self", ("target", args.Target),("bible", uid)); _popupSystem.PopupEntity(selfMessage, args.User, Filter.Entities(args.User)); - SoundSystem.Play(Filter.Pvs(args.Target.Value), component.HealSoundPath.GetSound(), args.User); + SoundSystem.Play(component.HealSoundPath.GetSound(), Filter.Pvs(args.Target.Value), args.User); _damageableSystem.TryChangeDamage(args.Target.Value, component.Damage, true); } diff --git a/Content.Server/Body/Components/BodyComponent.cs b/Content.Server/Body/Components/BodyComponent.cs index e3eda8804c..640786de58 100644 --- a/Content.Server/Body/Components/BodyComponent.cs +++ b/Content.Server/Body/Components/BodyComponent.cs @@ -92,7 +92,7 @@ namespace Content.Server.Body.Components _entMan.EventBus.RaiseLocalEvent(part, new PartGibbedEvent(Owner, gibs)); } - SoundSystem.Play(Filter.Pvs(Owner, entityManager: _entMan), _gibSound.GetSound(), coordinates, AudioHelpers.WithVariation(0.025f)); + SoundSystem.Play(_gibSound.GetSound(), Filter.Pvs(Owner, entityManager: _entMan), coordinates, AudioHelpers.WithVariation(0.025f)); if (_entMan.TryGetComponent(Owner, out ContainerManagerComponent? container)) { diff --git a/Content.Server/Body/Systems/BloodstreamSystem.cs b/Content.Server/Body/Systems/BloodstreamSystem.cs index 9e5cdc7722..2353f0dc6b 100644 --- a/Content.Server/Body/Systems/BloodstreamSystem.cs +++ b/Content.Server/Body/Systems/BloodstreamSystem.cs @@ -154,7 +154,7 @@ public sealed class BloodstreamSystem : EntitySystem if (totalFloat > 0 && _robustRandom.Prob(prob)) { TryModifyBloodLevel(uid, (-total) / 5, component); - SoundSystem.Play(Filter.Pvs(uid), component.InstantBloodSound.GetSound(), uid, AudioParams.Default); + SoundSystem.Play(component.InstantBloodSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default); } else if (totalFloat < 0 && oldBleedAmount > 0 && _robustRandom.Prob(healPopupProb)) { @@ -162,7 +162,7 @@ public sealed class BloodstreamSystem : EntitySystem // because it's burn damage that cauterized their wounds. // We'll play a special sound and popup for feedback. - SoundSystem.Play(Filter.Pvs(uid), component.BloodHealedSound.GetSound(), uid, AudioParams.Default); + SoundSystem.Play(component.BloodHealedSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default); _popupSystem.PopupEntity(Loc.GetString("bloodstream-component-wounds-cauterized"), uid, Filter.Entities(uid)); ; } diff --git a/Content.Server/Botany/Systems/PlantHolderSystem.cs b/Content.Server/Botany/Systems/PlantHolderSystem.cs index 6cc9226d20..e36ffc73b8 100644 --- a/Content.Server/Botany/Systems/PlantHolderSystem.cs +++ b/Content.Server/Botany/Systems/PlantHolderSystem.cs @@ -170,8 +170,8 @@ namespace Content.Server.Botany.Systems var solutionEntity = args.Used; - SoundSystem.Play(Filter.Pvs(args.Used), spray.SpraySound.GetSound(), args.Used, - AudioHelpers.WithVariation(0.125f)); + SoundSystem.Play(spray.SpraySound.GetSound(), Filter.Pvs(args.Used), + args.Used, AudioHelpers.WithVariation(0.125f)); var split =_solutionSystem.Drain(solutionEntity, solution, amount); diff --git a/Content.Server/Buckle/Components/BuckleComponent.cs b/Content.Server/Buckle/Components/BuckleComponent.cs index 0f42144791..9af8472f85 100644 --- a/Content.Server/Buckle/Components/BuckleComponent.cs +++ b/Content.Server/Buckle/Components/BuckleComponent.cs @@ -211,7 +211,7 @@ namespace Content.Server.Buckle.Components return false; } - SoundSystem.Play(Filter.Pvs(Owner), strap.BuckleSound.GetSound(), Owner); + SoundSystem.Play(strap.BuckleSound.GetSound(), Filter.Pvs(Owner), Owner); if (!strap.TryAdd(this)) { @@ -328,7 +328,7 @@ namespace Content.Server.Buckle.Components UpdateBuckleStatus(); oldBuckledTo.Remove(this); - SoundSystem.Play(Filter.Pvs(Owner), oldBuckledTo.UnbuckleSound.GetSound(), Owner); + SoundSystem.Play(oldBuckledTo.UnbuckleSound.GetSound(), Filter.Pvs(Owner), Owner); var ev = new BuckleChangeEvent() { Buckling = false, Strap = oldBuckledTo.Owner, BuckledEntity = Owner }; _entMan.EventBus.RaiseLocalEvent(Owner, ev, false); diff --git a/Content.Server/Cabinet/ItemCabinetSystem.cs b/Content.Server/Cabinet/ItemCabinetSystem.cs index 97fd98ca13..b84b382058 100644 --- a/Content.Server/Cabinet/ItemCabinetSystem.cs +++ b/Content.Server/Cabinet/ItemCabinetSystem.cs @@ -101,7 +101,7 @@ namespace Content.Server.Cabinet return; cabinet.Opened = !cabinet.Opened; - SoundSystem.Play(Filter.Pvs(uid), cabinet.DoorSound.GetSound(), uid, AudioHelpers.WithVariation(0.15f)); + SoundSystem.Play(cabinet.DoorSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.15f)); _itemSlotsSystem.SetLock(uid, cabinet.CabinetSlot, !cabinet.Opened); UpdateAppearance(uid, cabinet); diff --git a/Content.Server/Cargo/Components/CargoConsoleComponent.cs b/Content.Server/Cargo/Components/CargoConsoleComponent.cs index d72e786cda..890b8ac3ca 100644 --- a/Content.Server/Cargo/Components/CargoConsoleComponent.cs +++ b/Content.Server/Cargo/Components/CargoConsoleComponent.cs @@ -110,7 +110,7 @@ namespace Content.Server.Cargo.Components if (!_cargoConsoleSystem.AddOrder(orders.Database.Id, msg.Requester, msg.Reason, msg.ProductId, msg.Amount, _bankAccount.Id)) { - SoundSystem.Play(Filter.Pvs(Owner), _errorSound.GetSound(), Owner, AudioParams.Default); + SoundSystem.Play(_errorSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default); } break; } @@ -143,7 +143,7 @@ namespace Content.Server.Cargo.Components || !_cargoConsoleSystem.ChangeBalance(_bankAccount.Id, (-product.PointCost) * order.Amount)) ) { - SoundSystem.Play(Filter.Pvs(Owner), _errorSound.GetSound(), Owner, AudioParams.Default); + SoundSystem.Play(_errorSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default); break; } diff --git a/Content.Server/Cargo/Systems/CargoSystem.Telepad.cs b/Content.Server/Cargo/Systems/CargoSystem.Telepad.cs index 4f4f44643e..a773f05394 100644 --- a/Content.Server/Cargo/Systems/CargoSystem.Telepad.cs +++ b/Content.Server/Cargo/Systems/CargoSystem.Telepad.cs @@ -47,7 +47,7 @@ public sealed partial class CargoSystem var product = comp.TeleportQueue.Pop(); - SoundSystem.Play(Filter.Pvs(comp.Owner), comp.TeleportSound.GetSound(), comp.Owner, AudioParams.Default.WithVolume(-8f)); + SoundSystem.Play(comp.TeleportSound.GetSound(), Filter.Pvs(comp.Owner), comp.Owner, AudioParams.Default.WithVolume(-8f)); SpawnProduct(comp, product); comp.CurrentState = CargoTelepadState.Teleporting; diff --git a/Content.Server/Chat/ChatSystem.cs b/Content.Server/Chat/ChatSystem.cs index 5b5958a532..a874126cbf 100644 --- a/Content.Server/Chat/ChatSystem.cs +++ b/Content.Server/Chat/ChatSystem.cs @@ -161,7 +161,7 @@ public sealed class ChatSystem : SharedChatSystem _chatManager.ChatMessageToAll(ChatChannel.Radio, message, messageWrap, colorOverride); if (playDefaultSound) { - SoundSystem.Play(Filter.Broadcast(), AnnouncementSound, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(AnnouncementSound, Filter.Broadcast(), AudioParams.Default.WithVolume(-2f)); } _adminLogger.Add(LogType.Chat, LogImpact.Low, $"Global station announcement from {sender}: {message}"); } @@ -197,7 +197,7 @@ public sealed class ChatSystem : SharedChatSystem if (playDefaultSound) { - SoundSystem.Play(filter, AnnouncementSound, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(AnnouncementSound, filter, AudioParams.Default.WithVolume(-2f)); } _adminLogger.Add(LogType.Chat, LogImpact.Low, $"Station Announcement on {station} from {sender}: {message}"); diff --git a/Content.Server/Chemistry/Components/ChemMasterComponent.cs b/Content.Server/Chemistry/Components/ChemMasterComponent.cs index c51a05cbc2..6d18eaaec7 100644 --- a/Content.Server/Chemistry/Components/ChemMasterComponent.cs +++ b/Content.Server/Chemistry/Components/ChemMasterComponent.cs @@ -326,7 +326,7 @@ namespace Content.Server.Chemistry.Components private void ClickSound() { - SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f)); } } } diff --git a/Content.Server/Chemistry/Components/HyposprayComponent.cs b/Content.Server/Chemistry/Components/HyposprayComponent.cs index 8e18a42406..5680d89f01 100644 --- a/Content.Server/Chemistry/Components/HyposprayComponent.cs +++ b/Content.Server/Chemistry/Components/HyposprayComponent.cs @@ -80,7 +80,7 @@ namespace Content.Server.Chemistry.Components meleeSys.SendLunge(angle, user); } - SoundSystem.Play(Filter.Pvs(user), _injectSound.GetSound(), user); + SoundSystem.Play(_injectSound.GetSound(), Filter.Pvs(user), user); // Get transfer amount. May be smaller than _transferAmount if not enough room var realTransferAmount = FixedPoint2.Min(TransferAmount, targetSolution.AvailableVolume); diff --git a/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs b/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs index 629f1ef0f8..7d1d129ab7 100644 --- a/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs +++ b/Content.Server/Chemistry/Components/ReagentDispenserComponent.cs @@ -262,7 +262,7 @@ namespace Content.Server.Chemistry.Components private void ClickSound() { - SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f)); } private sealed class ReagentInventoryComparer : Comparer diff --git a/Content.Server/Chemistry/EntitySystems/ChemicalReactionSystem.cs b/Content.Server/Chemistry/EntitySystems/ChemicalReactionSystem.cs index abec024e8c..b4e976c4c0 100644 --- a/Content.Server/Chemistry/EntitySystems/ChemicalReactionSystem.cs +++ b/Content.Server/Chemistry/EntitySystems/ChemicalReactionSystem.cs @@ -19,7 +19,7 @@ namespace Content.Server.Chemistry.EntitySystems _adminLogger.Add(LogType.ChemicalReaction, reaction.Impact, $"Chemical reaction {reaction.ID:reaction} occurred with strength {unitReactions:strength} on entity {ToPrettyString(owner):metabolizer} at {coordinates}"); - SoundSystem.Play(Filter.Pvs(owner, entityManager:EntityManager), reaction.Sound.GetSound(), owner); + SoundSystem.Play(reaction.Sound.GetSound(), Filter.Pvs(owner, entityManager:EntityManager), owner); } } } diff --git a/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs b/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs index ad55575117..a55240b6d0 100644 --- a/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs +++ b/Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs @@ -114,7 +114,7 @@ namespace Content.Server.Chemistry.ReactionEffects areaEffectComponent.TryAddSolution(splitSolution); areaEffectComponent.Start(amount, _duration, _spreadDelay, _removeDelay); - SoundSystem.Play(Filter.Pvs(args.SolutionEntity), _sound.GetSound(), args.SolutionEntity, AudioHelpers.WithVariation(0.125f)); + SoundSystem.Play(_sound.GetSound(), Filter.Pvs(args.SolutionEntity), args.SolutionEntity, AudioHelpers.WithVariation(0.125f)); } protected abstract SolutionAreaEffectComponent? GetAreaEffectComponent(EntityUid entity); diff --git a/Content.Server/Chemistry/ReactionEffects/FoamAreaReactionEffect.cs b/Content.Server/Chemistry/ReactionEffects/FoamAreaReactionEffect.cs index 4b94adca7d..4959384645 100644 --- a/Content.Server/Chemistry/ReactionEffects/FoamAreaReactionEffect.cs +++ b/Content.Server/Chemistry/ReactionEffects/FoamAreaReactionEffect.cs @@ -38,7 +38,7 @@ namespace Content.Server.Chemistry.ReactionEffects areaEffectComponent.TryAddSolution(contents); areaEffectComponent.Start(amount, duration, spreadDelay, removeDelay); - SoundSystem.Play(Filter.Pvs(ent), sound.GetSound(), ent, AudioHelpers.WithVariation(0.125f)); + SoundSystem.Play(sound.GetSound(), Filter.Pvs(ent), ent, AudioHelpers.WithVariation(0.125f)); } } } diff --git a/Content.Server/Cloning/Components/CloningPodComponent.cs b/Content.Server/Cloning/Components/CloningPodComponent.cs index 37f7ed0dac..819d654dbb 100644 --- a/Content.Server/Cloning/Components/CloningPodComponent.cs +++ b/Content.Server/Cloning/Components/CloningPodComponent.cs @@ -150,7 +150,7 @@ namespace Content.Server.Cloning.Components // TODO: Ideally client knows about this and plays it on its own // Send them a sound to know it happened if (CloneStartSound != null) - SoundSystem.Play(Filter.SinglePlayer(client), CloneStartSound.GetSound()); + SoundSystem.Play(CloneStartSound.GetSound(), Filter.SinglePlayer(client)); var cloneMindReturn = _entities.AddComponent(mob); cloneMindReturn.Mind = mind; diff --git a/Content.Server/CombatMode/CombatModeSystem.cs b/Content.Server/CombatMode/CombatModeSystem.cs index dbb12217ae..f4398bdbdc 100644 --- a/Content.Server/CombatMode/CombatModeSystem.cs +++ b/Content.Server/CombatMode/CombatModeSystem.cs @@ -67,7 +67,7 @@ namespace Content.Server.CombatMode if (_random.Prob(component.DisarmFailChance)) { - SoundSystem.Play(Filter.Pvs(args.Performer), component.DisarmFailSound.GetSound(), args.Performer, AudioHelpers.WithVariation(0.025f)); + SoundSystem.Play(component.DisarmFailSound.GetSound(), Filter.Pvs(args.Performer), args.Performer, AudioHelpers.WithVariation(0.025f)); var targetName = Name(args.Target); @@ -86,7 +86,7 @@ namespace Content.Server.CombatMode } _meleeWeaponSystem.SendAnimation("disarm", angle, args.Performer, args.Performer, new[] { args.Target }); - SoundSystem.Play(filterAll, component.DisarmSuccessSound.GetSound(), args.Performer, AudioHelpers.WithVariation(0.025f)); + SoundSystem.Play(component.DisarmSuccessSound.GetSound(), filterAll, args.Performer, AudioHelpers.WithVariation(0.025f)); _adminLogger.Add(LogType.DisarmedAction, $"{ToPrettyString(args.Performer):user} used disarm on {ToPrettyString(args.Target):target}"); var eventArgs = new DisarmedEvent() { Target = args.Target, Source = args.Performer, PushProbability = component.DisarmPushChance }; diff --git a/Content.Server/Construction/Completions/PlaySound.cs b/Content.Server/Construction/Completions/PlaySound.cs index 5cadaf0d88..2efd405b5a 100644 --- a/Content.Server/Construction/Completions/PlaySound.cs +++ b/Content.Server/Construction/Completions/PlaySound.cs @@ -23,7 +23,7 @@ namespace Content.Server.Construction.Completions public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager) { var scale = (float) IoCManager.Resolve().NextGaussian(1, Variation); - SoundSystem.Play(Filter.Pvs(uid, entityManager: entityManager), Sound.GetSound(), uid, AudioParams.WithPitchScale(scale)); + SoundSystem.Play(Sound.GetSound(), Filter.Pvs(uid, entityManager: entityManager), uid, AudioParams.WithPitchScale(scale)); } } } diff --git a/Content.Server/Crayon/CrayonSystem.cs b/Content.Server/Crayon/CrayonSystem.cs index 3d8b19b1bd..2863de209e 100644 --- a/Content.Server/Crayon/CrayonSystem.cs +++ b/Content.Server/Crayon/CrayonSystem.cs @@ -68,7 +68,7 @@ public sealed class CrayonSystem : SharedCrayonSystem return; if (component.UseSound != null) - SoundSystem.Play(Filter.Pvs(uid), component.UseSound.GetSound(), uid, AudioHelpers.WithVariation(0.125f)); + SoundSystem.Play(component.UseSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f)); // Decrease "Ammo" component.Charges--; diff --git a/Content.Server/Cuffs/Components/CuffableComponent.cs b/Content.Server/Cuffs/Components/CuffableComponent.cs index ba43055792..ef3b3dbc96 100644 --- a/Content.Server/Cuffs/Components/CuffableComponent.cs +++ b/Content.Server/Cuffs/Components/CuffableComponent.cs @@ -216,11 +216,11 @@ namespace Content.Server.Cuffs.Components if (isOwner) { - SoundSystem.Play(Filter.Pvs(Owner), cuff.StartBreakoutSound.GetSound(), Owner); + SoundSystem.Play(cuff.StartBreakoutSound.GetSound(), Filter.Pvs(Owner), Owner); } else { - SoundSystem.Play(Filter.Pvs(Owner), cuff.StartUncuffSound.GetSound(), Owner); + SoundSystem.Play(cuff.StartUncuffSound.GetSound(), Filter.Pvs(Owner), Owner); } var uncuffTime = isOwner ? cuff.BreakoutTime : cuff.UncuffTime; @@ -242,7 +242,7 @@ namespace Content.Server.Cuffs.Components if (result != DoAfterStatus.Cancelled) { - SoundSystem.Play(Filter.Pvs(Owner), cuff.EndUncuffSound.GetSound(), Owner); + SoundSystem.Play(cuff.EndUncuffSound.GetSound(), Filter.Pvs(Owner), Owner); Container.ForceRemove(cuffsToRemove.Value); var transform = _entMan.GetComponent(cuffsToRemove.Value); diff --git a/Content.Server/Cuffs/Components/HandcuffComponent.cs b/Content.Server/Cuffs/Components/HandcuffComponent.cs index 0bdd958ab7..eb1a942577 100644 --- a/Content.Server/Cuffs/Components/HandcuffComponent.cs +++ b/Content.Server/Cuffs/Components/HandcuffComponent.cs @@ -178,7 +178,7 @@ namespace Content.Server.Cuffs.Components eventArgs.User.PopupMessage(Loc.GetString("handcuff-component-start-cuffing-target-message",("targetName", eventArgs.Target))); eventArgs.User.PopupMessage(target, Loc.GetString("handcuff-component-start-cuffing-by-other-message",("otherName", eventArgs.User))); } - SoundSystem.Play(Filter.Pvs(Owner), StartCuffSound.GetSound(), Owner); + SoundSystem.Play(StartCuffSound.GetSound(), Filter.Pvs(Owner), Owner); TryUpdateCuff(eventArgs.User, target, cuffed); return true; @@ -215,7 +215,7 @@ namespace Content.Server.Cuffs.Components { if (cuffs.TryAddNewCuffs(user, Owner)) { - SoundSystem.Play(Filter.Pvs(Owner), EndCuffSound.GetSound(), Owner); + SoundSystem.Play(EndCuffSound.GetSound(), Filter.Pvs(Owner), Owner); if (target == user) { user.PopupMessage(Loc.GetString("handcuff-component-cuff-self-success-message")); diff --git a/Content.Server/Damage/Systems/DamageOnHighSpeedImpactSystem.cs b/Content.Server/Damage/Systems/DamageOnHighSpeedImpactSystem.cs index 79ad45304f..054844e13c 100644 --- a/Content.Server/Damage/Systems/DamageOnHighSpeedImpactSystem.cs +++ b/Content.Server/Damage/Systems/DamageOnHighSpeedImpactSystem.cs @@ -34,7 +34,7 @@ namespace Content.Server.Damage.Systems if (speed < component.MinimumSpeed) return; - SoundSystem.Play(Filter.Pvs(otherBody), component.SoundHit.GetSound(), otherBody, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f)); + SoundSystem.Play(component.SoundHit.GetSound(), Filter.Pvs(otherBody), otherBody, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f)); if ((_gameTiming.CurTime - component.LastHit).TotalSeconds < component.DamageCooldown) return; diff --git a/Content.Server/Destructible/Thresholds/Behaviors/PlaySoundBehavior.cs b/Content.Server/Destructible/Thresholds/Behaviors/PlaySoundBehavior.cs index 06d86d8970..94c3a65480 100644 --- a/Content.Server/Destructible/Thresholds/Behaviors/PlaySoundBehavior.cs +++ b/Content.Server/Destructible/Thresholds/Behaviors/PlaySoundBehavior.cs @@ -17,7 +17,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors public void Execute(EntityUid owner, DestructibleSystem system) { var pos = system.EntityManager.GetComponent(owner).Coordinates; - SoundSystem.Play(Filter.Pvs(pos), Sound.GetSound(), pos, AudioHelpers.WithVariation(0.125f)); + SoundSystem.Play(Sound.GetSound(), Filter.Pvs(pos), pos, AudioHelpers.WithVariation(0.125f)); } } } diff --git a/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs b/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs index 68f1f3bfde..042f806941 100644 --- a/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs +++ b/Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs @@ -104,7 +104,7 @@ public sealed class NetworkConfiguratorSystem : EntitySystem if (_accessSystem.IsAllowed(user.Value, reader)) return true; - SoundSystem.Play(Filter.Pvs(user.Value), component.SoundNoAccess.GetSound(), target, AudioParams.Default.WithVolume(-2f).WithPitchScale(1.2f)); + SoundSystem.Play(component.SoundNoAccess.GetSound(), Filter.Pvs(user.Value), target, AudioParams.Default.WithVolume(-2f).WithPitchScale(1.2f)); _popupSystem.PopupEntity(Loc.GetString("network-configurator-device-access-denied"), target, Filter.Entities(user.Value)); return false; diff --git a/Content.Server/Dice/DiceSystem.cs b/Content.Server/Dice/DiceSystem.cs index b87cd3f73a..d21ea00670 100644 --- a/Content.Server/Dice/DiceSystem.cs +++ b/Content.Server/Dice/DiceSystem.cs @@ -75,7 +75,7 @@ namespace Content.Server.Dice SetCurrentSide(uid, roll, die); die.Owner.PopupMessageEveryone(Loc.GetString("dice-component-on-roll-land", ("die", die.Owner), ("currentSide", die.CurrentSide))); - SoundSystem.Play(Filter.Pvs(die.Owner), die.Sound.GetSound(), die.Owner, AudioHelpers.WithVariation(0.05f)); + SoundSystem.Play(die.Sound.GetSound(), Filter.Pvs(die.Owner), die.Owner, AudioHelpers.WithVariation(0.05f)); } } } diff --git a/Content.Server/Disease/DiseaseDiagnosisSystem.cs b/Content.Server/Disease/DiseaseDiagnosisSystem.cs index 2024d3aefe..705ac08d2d 100644 --- a/Content.Server/Disease/DiseaseDiagnosisSystem.cs +++ b/Content.Server/Disease/DiseaseDiagnosisSystem.cs @@ -159,7 +159,7 @@ namespace Content.Server.Disease AddQueue.Enqueue(uid); UpdateAppearance(uid, true, true); - SoundSystem.Play(Filter.Pvs(uid), "/Audio/Machines/diagnoser_printing.ogg", uid); + SoundSystem.Play("/Audio/Machines/diagnoser_printing.ogg", Filter.Pvs(uid), uid); } /// @@ -190,7 +190,7 @@ namespace Content.Server.Disease AddQueue.Enqueue(uid); UpdateAppearance(uid, true, true); - SoundSystem.Play(Filter.Pvs(uid), "/Audio/Machines/vaccinator_running.ogg", uid); + SoundSystem.Play("/Audio/Machines/vaccinator_running.ogg", Filter.Pvs(uid), uid); } /// diff --git a/Content.Server/Disease/Effects/DiseaseSnough.cs b/Content.Server/Disease/Effects/DiseaseSnough.cs index a24614f530..8eea9af3ca 100644 --- a/Content.Server/Disease/Effects/DiseaseSnough.cs +++ b/Content.Server/Disease/Effects/DiseaseSnough.cs @@ -34,7 +34,7 @@ namespace Content.Server.Disease public override void Effect(DiseaseEffectArgs args) { if (SnoughSound != null) - SoundSystem.Play(Filter.Pvs(args.DiseasedEntity), SnoughSound.GetSound(), args.DiseasedEntity, AudioHelpers.WithVariation(0.2f)); + SoundSystem.Play(SnoughSound.GetSound(), Filter.Pvs(args.DiseasedEntity), args.DiseasedEntity, AudioHelpers.WithVariation(0.2f)); EntitySystem.Get().SneezeCough(args.DiseasedEntity, args.Disease, SnoughMessage, AirTransmit); } } diff --git a/Content.Server/Disposal/Tube/Components/DisposalRouterComponent.cs b/Content.Server/Disposal/Tube/Components/DisposalRouterComponent.cs index 5503f8af2c..281690092b 100644 --- a/Content.Server/Disposal/Tube/Components/DisposalRouterComponent.cs +++ b/Content.Server/Disposal/Tube/Components/DisposalRouterComponent.cs @@ -114,7 +114,7 @@ namespace Content.Server.Disposal.Tube.Components private void ClickSound() { - SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f)); } protected override void OnRemove() diff --git a/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs b/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs index f097c8e48e..9df509d954 100644 --- a/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs +++ b/Content.Server/Disposal/Tube/Components/DisposalTaggerComponent.cs @@ -83,7 +83,7 @@ namespace Content.Server.Disposal.Tube.Components private void ClickSound() { - SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f)); } protected override void OnRemove() diff --git a/Content.Server/Disposal/Tube/DisposalTubeSystem.cs b/Content.Server/Disposal/Tube/DisposalTubeSystem.cs index 9533b1db9e..57f1b84ef9 100644 --- a/Content.Server/Disposal/Tube/DisposalTubeSystem.cs +++ b/Content.Server/Disposal/Tube/DisposalTubeSystem.cs @@ -72,7 +72,7 @@ namespace Content.Server.Disposal.Tube } component.LastClang = _gameTiming.CurTime; - SoundSystem.Play(Filter.Pvs(uid), component.ClangSound.GetSound(), uid); + SoundSystem.Play(component.ClangSound.GetSound(), Filter.Pvs(uid), uid); } private void OnBreak(EntityUid uid, DisposalTubeComponent component, BreakageEventArgs args) diff --git a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs index 9dc857c6df..edcfd16b3d 100644 --- a/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs +++ b/Content.Server/Disposal/Unit/EntitySystems/DisposalUnitSystem.cs @@ -200,7 +200,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems break; case SharedDisposalUnitComponent.UiButton.Power: TogglePower(component); - SoundSystem.Play(Filter.Pvs(component.Owner), "/Audio/Machines/machine_switch.ogg", component.Owner, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play("/Audio/Machines/machine_switch.ogg", Filter.Pvs(component.Owner), component.Owner, AudioParams.Default.WithVolume(-2f)); break; default: throw new ArgumentOutOfRangeException(); diff --git a/Content.Server/Doors/Components/AirlockComponent.cs b/Content.Server/Doors/Components/AirlockComponent.cs index a4008cf40e..71cf83c71a 100644 --- a/Content.Server/Doors/Components/AirlockComponent.cs +++ b/Content.Server/Doors/Components/AirlockComponent.cs @@ -154,7 +154,7 @@ namespace Content.Server.Doors.Components BoltsDown = newBolts; - SoundSystem.Play(Filter.Broadcast(), newBolts ? BoltDownSound.GetSound() : BoltUpSound.GetSound(), Owner); + SoundSystem.Play(newBolts ? BoltDownSound.GetSound() : BoltUpSound.GetSound(), Filter.Broadcast(), Owner); } } } diff --git a/Content.Server/Doors/Systems/DoorSystem.cs b/Content.Server/Doors/Systems/DoorSystem.cs index 3b9d3c5efe..f2f635618b 100644 --- a/Content.Server/Doors/Systems/DoorSystem.cs +++ b/Content.Server/Doors/Systems/DoorSystem.cs @@ -109,7 +109,7 @@ public sealed class DoorSystem : SharedDoorSystem } // send the sound to players. - SoundSystem.Play(filter, sound, uid, audioParams); + SoundSystem.Play(sound, filter, uid, audioParams); } #region DoAfters diff --git a/Content.Server/Electrocution/ElectrocutionSystem.cs b/Content.Server/Electrocution/ElectrocutionSystem.cs index 85134c2ea6..56e047233d 100644 --- a/Content.Server/Electrocution/ElectrocutionSystem.cs +++ b/Content.Server/Electrocution/ElectrocutionSystem.cs @@ -442,7 +442,7 @@ namespace Content.Server.Electrocution return; } - SoundSystem.Play(Filter.Pvs(targetUid), electrified.ShockNoises.GetSound(), targetUid, AudioParams.Default.WithVolume(electrified.ShockVolume)); + SoundSystem.Play(electrified.ShockNoises.GetSound(), Filter.Pvs(targetUid), targetUid, AudioParams.Default.WithVolume(electrified.ShockVolume)); } } } diff --git a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs index 0585bda8ba..6ed988bc84 100644 --- a/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs +++ b/Content.Server/Explosion/EntitySystems/ExplosionSystem.cs @@ -284,7 +284,7 @@ public sealed partial class ExplosionSystem : EntitySystem // play sound. var audioRange = iterationIntensity.Count * 5; var filter = Filter.Pvs(epicenter).AddInRange(epicenter, audioRange); - SoundSystem.Play(filter, type.Sound.GetSound(), mapEntityCoords, _audioParams); + SoundSystem.Play(type.Sound.GetSound(), filter, mapEntityCoords, _audioParams); return new Explosion(this, type, diff --git a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs index a39e78a1d5..b6ce1e5b0f 100644 --- a/Content.Server/Explosion/EntitySystems/TriggerSystem.cs +++ b/Content.Server/Explosion/EntitySystems/TriggerSystem.cs @@ -162,7 +162,7 @@ namespace Content.Server.Explosion.EntitySystems timer.TimeUntilBeep += timer.BeepInterval; var filter = Filter.Pvs(timer.Owner, entityManager: EntityManager); - SoundSystem.Play(filter, timer.BeepSound.GetSound(), timer.Owner, timer.BeepParams); + SoundSystem.Play(timer.BeepSound.GetSound(), filter, timer.Owner, timer.BeepParams); } foreach (var uid in toRemove) diff --git a/Content.Server/Extinguisher/FireExtinguisherSystem.cs b/Content.Server/Extinguisher/FireExtinguisherSystem.cs index e3db53433a..6b5b2fb12a 100644 --- a/Content.Server/Extinguisher/FireExtinguisherSystem.cs +++ b/Content.Server/Extinguisher/FireExtinguisherSystem.cs @@ -85,7 +85,7 @@ public sealed class FireExtinguisherSystem : EntitySystem var drained = _solutionContainerSystem.Drain(target, targetSolution, transfer); _solutionContainerSystem.TryAddSolution(uid, container, drained); - SoundSystem.Play(Filter.Pvs(uid), component.RefillSound.GetSound(), uid); + SoundSystem.Play(component.RefillSound.GetSound(), Filter.Pvs(uid), uid); _popupSystem.PopupEntity(Loc.GetString("fire-extinguisher-component-after-interact-refilled-message", ("owner", uid)), uid, Filter.Entities(args.Target.Value)); } @@ -134,8 +134,8 @@ public sealed class FireExtinguisherSystem : EntitySystem return; extinguisher.Safety = !extinguisher.Safety; - SoundSystem.Play(Filter.Pvs(uid), extinguisher.SafetySound.GetSound(), uid, - AudioHelpers.WithVariation(0.125f).WithVolume(-4f)); + SoundSystem.Play(extinguisher.SafetySound.GetSound(), Filter.Pvs(uid), + uid, AudioHelpers.WithVariation(0.125f).WithVolume(-4f)); UpdateAppearance(uid, extinguisher); } } diff --git a/Content.Server/Flash/FlashSystem.cs b/Content.Server/Flash/FlashSystem.cs index f52fab911a..e3df2eb3e0 100644 --- a/Content.Server/Flash/FlashSystem.cs +++ b/Content.Server/Flash/FlashSystem.cs @@ -113,7 +113,7 @@ namespace Content.Server.Flash }); } - SoundSystem.Play(Filter.Pvs(comp.Owner), comp.Sound.GetSound(), comp.Owner, AudioParams.Default); + SoundSystem.Play(comp.Sound.GetSound(), Filter.Pvs(comp.Owner), comp.Owner, AudioParams.Default); return true; } @@ -169,7 +169,7 @@ namespace Content.Server.Flash } if (sound != null) { - SoundSystem.Play(Filter.Pvs(transform), sound.GetSound(), transform.Coordinates); + SoundSystem.Play(sound.GetSound(), Filter.Pvs(transform), transform.Coordinates); } } diff --git a/Content.Server/Fluids/EntitySystems/MoppingSystem.cs b/Content.Server/Fluids/EntitySystems/MoppingSystem.cs index 0ce8831fff..2e15f827a9 100644 --- a/Content.Server/Fluids/EntitySystems/MoppingSystem.cs +++ b/Content.Server/Fluids/EntitySystems/MoppingSystem.cs @@ -130,7 +130,7 @@ public sealed class MoppingSystem : EntitySystem TryTransfer(used, target, "absorbed", puddle.SolutionName, transferAmount); // Complete the transfer right away, with no doAfter. sfx = component.TransferSound; - SoundSystem.Play(Filter.Pvs(user), sfx.GetSound(), used); // Give instant feedback for diluting puddle, so that it's clear that the player is adding to the puddle (as opposed to other behaviours, which have a doAfter). + SoundSystem.Play(sfx.GetSound(), Filter.Pvs(user), used); // Give instant feedback for diluting puddle, so that it's clear that the player is adding to the puddle (as opposed to other behaviours, which have a doAfter). msg = "mopping-system-puddle-diluted"; user.PopupMessage(user, Loc.GetString(msg)); // play message now because we are aborting. @@ -307,7 +307,7 @@ public sealed class MoppingSystem : EntitySystem private void OnTransferComplete(TransferCompleteEvent ev) { - SoundSystem.Play(Filter.Pvs(ev.User), ev.Sound.GetSound(), ev.Tool); // Play the After SFX + SoundSystem.Play(ev.Sound.GetSound(), Filter.Pvs(ev.User), ev.Tool); // Play the After SFX ev.User.PopupMessage(ev.User, Loc.GetString(ev.Message, ("target", ev.Target), ("used", ev.Tool))); // Play the After popup message diff --git a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs index ed0979aa99..6ea0722ae1 100644 --- a/Content.Server/Fluids/EntitySystems/PuddleSystem.cs +++ b/Content.Server/Fluids/EntitySystems/PuddleSystem.cs @@ -164,8 +164,8 @@ namespace Content.Server.Fluids.EntitySystems return true; } - SoundSystem.Play(Filter.Pvs(puddleComponent.Owner), puddleComponent.SpillSound.GetSound(), - puddleComponent.Owner); + SoundSystem.Play(puddleComponent.SpillSound.GetSound(), + Filter.Pvs(puddleComponent.Owner), puddleComponent.Owner); return true; } diff --git a/Content.Server/Fluids/EntitySystems/SpraySystem.cs b/Content.Server/Fluids/EntitySystems/SpraySystem.cs index 9e93257d7a..cc786bc186 100644 --- a/Content.Server/Fluids/EntitySystems/SpraySystem.cs +++ b/Content.Server/Fluids/EntitySystems/SpraySystem.cs @@ -113,7 +113,7 @@ public sealed class SpraySystem : EntitySystem body.ApplyLinearImpulse(-impulseDirection * component.Impulse); } - SoundSystem.Play(Filter.Pvs(uid), component.SpraySound.GetSound(), uid, AudioHelpers.WithVariation(0.125f)); + SoundSystem.Play(component.SpraySound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f)); RaiseLocalEvent(uid, new RefreshItemCooldownEvent(curTime, curTime + TimeSpan.FromSeconds(component.CooldownTime))); diff --git a/Content.Server/GameTicking/GameTicker.RoundFlow.cs b/Content.Server/GameTicking/GameTicker.RoundFlow.cs index 6a1b22bd40..073975222d 100644 --- a/Content.Server/GameTicking/GameTicker.RoundFlow.cs +++ b/Content.Server/GameTicking/GameTicker.RoundFlow.cs @@ -480,7 +480,7 @@ namespace Content.Server.GameTicking _chatSystem.DispatchGlobalStationAnnouncement(Loc.GetString(proto.Message), playDefaultSound: true); if (proto.Sound != null) - SoundSystem.Play(Filter.Broadcast(), proto.Sound.GetSound()); + SoundSystem.Play(proto.Sound.GetSound(), Filter.Broadcast()); // Only play one because A break; diff --git a/Content.Server/GameTicking/Rules/SuspicionRuleSystem.cs b/Content.Server/GameTicking/Rules/SuspicionRuleSystem.cs index e2c666f739..d2a07e377c 100644 --- a/Content.Server/GameTicking/Rules/SuspicionRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/SuspicionRuleSystem.cs @@ -216,7 +216,7 @@ public sealed class SuspicionRuleSystem : GameRuleSystem var filter = Filter.Empty() .AddWhere(session => ((IPlayerSession) session).ContentData()?.Mind?.HasRole() ?? false); - SoundSystem.Play(filter, _addedSound.GetSound(), AudioParams.Default); + SoundSystem.Play(_addedSound.GetSound(), filter, AudioParams.Default); _doorSystem.AccessType = SharedDoorSystem.AccessTypes.AllowAllNoExternal; diff --git a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs index 87f3e340d4..ee90cd4a45 100644 --- a/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs +++ b/Content.Server/GameTicking/Rules/TraitorRuleSystem.cs @@ -192,7 +192,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem traitor.Mind.Briefing = Loc.GetString("traitor-role-codewords", ("codewords", string.Join(", ",codewords))); } - SoundSystem.Play(Filter.Empty().AddWhere(s => ((IPlayerSession)s).Data.ContentData()?.Mind?.HasRole() ?? false), _addedSound.GetSound(), AudioParams.Default); + SoundSystem.Play(_addedSound.GetSound(), Filter.Empty().AddWhere(s => ((IPlayerSession)s).Data.ContentData()?.Mind?.HasRole() ?? false), AudioParams.Default); } private void OnRoundEndText(RoundEndTextAppendEvent ev) diff --git a/Content.Server/Gatherable/GatherableSystem.cs b/Content.Server/Gatherable/GatherableSystem.cs index e55667b374..396c8637f4 100644 --- a/Content.Server/Gatherable/GatherableSystem.cs +++ b/Content.Server/Gatherable/GatherableSystem.cs @@ -64,7 +64,7 @@ public sealed class GatherableSystem : EntitySystem // Complete the gathering process _damageableSystem.TryChangeDamage(ev.Resource, tool.Damage); - SoundSystem.Play(Filter.Pvs(ev.Resource, entityManager: EntityManager), tool.GatheringSound.GetSound(), ev.Resource); + SoundSystem.Play(tool.GatheringSound.GetSound(), Filter.Pvs(ev.Resource, entityManager: EntityManager), ev.Resource); tool.GatheringEntities.Remove(ev.Resource); // Spawn the loot! diff --git a/Content.Server/Gravity/EntitySystems/GravityShakeSystem.cs b/Content.Server/Gravity/EntitySystems/GravityShakeSystem.cs index d2e157b1e8..cd03ff714f 100644 --- a/Content.Server/Gravity/EntitySystems/GravityShakeSystem.cs +++ b/Content.Server/Gravity/EntitySystems/GravityShakeSystem.cs @@ -48,10 +48,8 @@ namespace Content.Server.Gravity.EntitySystems { _gridsToShake[gridId] = ShakeTimes; - SoundSystem.Play( - Filter.BroadcastGrid(gridId), - comp.GravityShakeSound.GetSound(), - AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(comp.GravityShakeSound.GetSound(), + Filter.BroadcastGrid(gridId), AudioParams.Default.WithVolume(-2f)); } private void ShakeGrids() diff --git a/Content.Server/Guardian/GuardianSystem.cs b/Content.Server/Guardian/GuardianSystem.cs index 634feecb3a..2e162faeb6 100644 --- a/Content.Server/Guardian/GuardianSystem.cs +++ b/Content.Server/Guardian/GuardianSystem.cs @@ -200,7 +200,7 @@ namespace Content.Server.Guardian { guardianComponent.Host = ev.Target; - SoundSystem.Play(Filter.Entities(ev.Target), "/Audio/Effects/guardian_inject.ogg", ev.Target); + SoundSystem.Play("/Audio/Effects/guardian_inject.ogg", Filter.Entities(ev.Target), ev.Target); _popupSystem.PopupEntity(Loc.GetString("guardian-created"), ev.Target, Filter.Entities(ev.Target)); // Exhaust the activator @@ -223,11 +223,11 @@ namespace Content.Server.Guardian if (args.CurrentMobState.IsCritical()) { _popupSystem.PopupEntity(Loc.GetString("guardian-critical-warn"), component.HostedGuardian.Value, Filter.Entities(component.HostedGuardian.Value)); - SoundSystem.Play(Filter.Entities(component.HostedGuardian.Value), "/Audio/Effects/guardian_warn.ogg", component.HostedGuardian.Value); + SoundSystem.Play("/Audio/Effects/guardian_warn.ogg", Filter.Entities(component.HostedGuardian.Value), component.HostedGuardian.Value); } else if (args.CurrentMobState.IsDead()) { - SoundSystem.Play(Filter.Pvs(uid), "/Audio/Voice/Human/malescream_guardian.ogg", uid, AudioHelpers.WithVariation(0.20f)); + SoundSystem.Play("/Audio/Voice/Human/malescream_guardian.ogg", Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.20f)); EntityManager.RemoveComponent(uid); } } diff --git a/Content.Server/ImmovableRod/ImmovableRodSystem.cs b/Content.Server/ImmovableRod/ImmovableRodSystem.cs index c4a56da233..b7072be80e 100644 --- a/Content.Server/ImmovableRod/ImmovableRodSystem.cs +++ b/Content.Server/ImmovableRod/ImmovableRodSystem.cs @@ -77,7 +77,7 @@ public sealed class ImmovableRodSystem : EntitySystem if (_random.Prob(component.HitSoundProbability)) { - SoundSystem.Play(Filter.Pvs(uid), component.Sound.GetSound(), uid, component.Sound.Params); + SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(uid), uid, component.Sound.Params); } if (HasComp(ent)) diff --git a/Content.Server/Interaction/InteractionPopupSystem.cs b/Content.Server/Interaction/InteractionPopupSystem.cs index 3172bc3b47..21683444a2 100644 --- a/Content.Server/Interaction/InteractionPopupSystem.cs +++ b/Content.Server/Interaction/InteractionPopupSystem.cs @@ -68,9 +68,9 @@ public sealed class InteractionPopupSystem : EntitySystem if (sfx is not null) //not all cases will have sound. { if (component.SoundPerceivedByOthers) - SoundSystem.Play(Filter.Pvs(args.Target), sfx, args.Target); //play for everyone in range + SoundSystem.Play(sfx, Filter.Pvs(args.Target), args.Target); //play for everyone in range else - SoundSystem.Play(Filter.Entities(args.User, args.Target), sfx, args.Target); //play only for the initiating entity and its target. + SoundSystem.Play(sfx, Filter.Entities(args.User, args.Target), args.Target); //play only for the initiating entity and its target. } component.LastInteractTime = curTime; diff --git a/Content.Server/Kitchen/Components/MicrowaveComponent.cs b/Content.Server/Kitchen/Components/MicrowaveComponent.cs index 6b0ef43cc2..e7cb4fc128 100644 --- a/Content.Server/Kitchen/Components/MicrowaveComponent.cs +++ b/Content.Server/Kitchen/Components/MicrowaveComponent.cs @@ -225,7 +225,7 @@ namespace Content.Server.Kitchen.Components // destroy microwave Broken = true; SetAppearance(MicrowaveVisualState.Broken); - SoundSystem.Play(Filter.Pvs(Owner), ItemBreakSound.GetSound(), Owner); + SoundSystem.Play(ItemBreakSound.GetSound(), Filter.Pvs(Owner), Owner); return; } @@ -277,7 +277,7 @@ namespace Content.Server.Kitchen.Components SetAppearance(MicrowaveVisualState.Cooking); var time = _currentCookTimerTime * _cookTimeMultiplier; - SoundSystem.Play(Filter.Pvs(Owner), _startCookingSound.GetSound(), Owner, AudioParams.Default); + SoundSystem.Play(_startCookingSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default); Owner.SpawnTimer((int) (_currentCookTimerTime * _cookTimeMultiplier), () => { if (_lostPower) @@ -296,8 +296,8 @@ namespace Content.Server.Kitchen.Components EjectSolids(); - SoundSystem.Play(Filter.Pvs(Owner), _cookingCompleteSound.GetSound(), Owner, - AudioParams.Default.WithVolume(-1f)); + SoundSystem.Play(_cookingCompleteSound.GetSound(), Filter.Pvs(Owner), + Owner, AudioParams.Default.WithVolume(-1f)); SetAppearance(MicrowaveVisualState.Idle); _busy = false; @@ -445,7 +445,7 @@ namespace Content.Server.Kitchen.Components public void ClickSound() { - SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f)); } } diff --git a/Content.Server/Kitchen/EntitySystems/KitchenSpikeSystem.cs b/Content.Server/Kitchen/EntitySystems/KitchenSpikeSystem.cs index 045a9bae13..db2c418fe3 100644 --- a/Content.Server/Kitchen/EntitySystems/KitchenSpikeSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/KitchenSpikeSystem.cs @@ -123,7 +123,7 @@ namespace Content.Server.Kitchen.EntitySystems // TODO: Need to be able to leave them on the spike to do DoT, see ss13. EntityManager.QueueDeleteEntity(victimUid); - SoundSystem.Play(Filter.Pvs(uid), component.SpikeSound.GetSound(), uid); + SoundSystem.Play(component.SpikeSound.GetSound(), Filter.Pvs(uid), uid); } private bool TryGetPiece(EntityUid uid, EntityUid user, EntityUid used, diff --git a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs index 92aa41bfd5..48acc9907f 100644 --- a/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs +++ b/Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs @@ -238,7 +238,7 @@ namespace Content.Server.Kitchen.EntitySystems switch (program) { case SharedReagentGrinderComponent.GrinderProgram.Grind: - SoundSystem.Play(Filter.Pvs(component.Owner), component.GrindSound.GetSound(), component.Owner, AudioParams.Default); + SoundSystem.Play(component.GrindSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioParams.Default); // Get each item inside the chamber and get the reagents it contains. // Transfer those reagents to the beaker, given we have one in. component.Owner.SpawnTimer(component.WorkTime, () => @@ -265,7 +265,7 @@ namespace Content.Server.Kitchen.EntitySystems break; case SharedReagentGrinderComponent.GrinderProgram.Juice: - SoundSystem.Play(Filter.Pvs(component.Owner), component.JuiceSound.GetSound(), component.Owner, AudioParams.Default); + SoundSystem.Play(component.JuiceSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioParams.Default); component.Owner.SpawnTimer(component.WorkTime, () => { foreach (var item in component.Chamber.ContainedEntities.ToList()) @@ -299,7 +299,7 @@ namespace Content.Server.Kitchen.EntitySystems private void ClickSound(ReagentGrinderComponent component) { - SoundSystem.Play(Filter.Pvs(component.Owner), component.ClickSound.GetSound(), component.Owner, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(component.ClickSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioParams.Default.WithVolume(-2f)); } } } diff --git a/Content.Server/Lathe/LatheSystem.cs b/Content.Server/Lathe/LatheSystem.cs index dcd7426fcc..1a7a184b36 100644 --- a/Content.Server/Lathe/LatheSystem.cs +++ b/Content.Server/Lathe/LatheSystem.cs @@ -136,7 +136,7 @@ namespace Content.Server.Lathe // Play a sound when inserting, if any if (component.InsertingSound != null) { - SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.InsertingSound.GetSound(), component.Owner); + SoundSystem.Play(component.InsertingSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner); } // We need the prototype to get the color @@ -191,7 +191,7 @@ namespace Content.Server.Lathe component.UserInterface?.SendMessage(new LatheProducingRecipeMessage(recipe.ID)); if (component.ProducingSound != null) { - SoundSystem.Play(Filter.Pvs(component.Owner), component.ProducingSound.GetSound(), component.Owner); + SoundSystem.Play(component.ProducingSound.GetSound(), Filter.Pvs(component.Owner), component.Owner); } UpdateRunningAppearance(component.Owner, true); ProducingAddQueue.Enqueue(component.Owner); diff --git a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs index ea600db5bf..43b576727b 100644 --- a/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs +++ b/Content.Server/Light/EntitySystems/ExpendableLightSystem.cs @@ -123,7 +123,7 @@ namespace Content.Server.Light.EntitySystems { case ExpendableLightState.Lit: { - SoundSystem.Play(Filter.Pvs(component.Owner), component.LitSound.GetSound(), component.Owner); + SoundSystem.Play(component.LitSound.GetSound(), Filter.Pvs(component.Owner), component.Owner); if (component.IconStateLit != string.Empty) { @@ -142,7 +142,7 @@ namespace Content.Server.Light.EntitySystems case ExpendableLightState.Dead: { if (component.DieSound != null) - SoundSystem.Play(Filter.Pvs(component.Owner), component.DieSound.GetSound(), component.Owner); + SoundSystem.Play(component.DieSound.GetSound(), Filter.Pvs(component.Owner), component.Owner); sprite.LayerSetState(0, component.IconStateSpent); sprite.LayerSetShader(0, "shaded"); diff --git a/Content.Server/Light/EntitySystems/HandheldLightSystem.cs b/Content.Server/Light/EntitySystems/HandheldLightSystem.cs index 023c93d95d..7d589ba853 100644 --- a/Content.Server/Light/EntitySystems/HandheldLightSystem.cs +++ b/Content.Server/Light/EntitySystems/HandheldLightSystem.cs @@ -211,7 +211,7 @@ namespace Content.Server.Light.EntitySystems appearance.SetData(ToggleableLightVisuals.Enabled, false); if (makeNoise) - SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.TurnOffSound.GetSound(), component.Owner); + SoundSystem.Play(component.TurnOffSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner); return true; } @@ -222,7 +222,7 @@ namespace Content.Server.Light.EntitySystems if (!_powerCell.TryGetBatteryFromSlot(component.Owner, out var battery)) { - SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.TurnOnFailSound.GetSound(), component.Owner); + SoundSystem.Play(component.TurnOnFailSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner); _popup.PopupEntity(Loc.GetString("handheld-light-component-cell-missing-message"), component.Owner, Filter.Entities(user)); return false; } @@ -232,7 +232,7 @@ namespace Content.Server.Light.EntitySystems // Simple enough. if (component.Wattage > battery.CurrentCharge) { - SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.TurnOnFailSound.GetSound(), component.Owner); + SoundSystem.Play(component.TurnOnFailSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner); _popup.PopupEntity(Loc.GetString("handheld-light-component-cell-dead-message"), component.Owner, Filter.Entities(user)); return false; } @@ -247,7 +247,7 @@ namespace Content.Server.Light.EntitySystems if (TryComp(component.Owner, out AppearanceComponent? appearance)) appearance.SetData(ToggleableLightVisuals.Enabled, true); - SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.TurnOnSound.GetSound(), component.Owner); + SoundSystem.Play(component.TurnOnSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner); return true; } diff --git a/Content.Server/Light/EntitySystems/LightBulbSystem.cs b/Content.Server/Light/EntitySystems/LightBulbSystem.cs index 91b8a6c1d7..90215ec5ad 100644 --- a/Content.Server/Light/EntitySystems/LightBulbSystem.cs +++ b/Content.Server/Light/EntitySystems/LightBulbSystem.cs @@ -65,7 +65,7 @@ namespace Content.Server.Light.EntitySystems if (!Resolve(uid, ref bulb)) return; - SoundSystem.Play(Filter.Pvs(uid), bulb.BreakSound.GetSound(), uid); + SoundSystem.Play(bulb.BreakSound.GetSound(), Filter.Pvs(uid), uid); } private void UpdateAppearance(EntityUid uid, LightBulbComponent? bulb = null, diff --git a/Content.Server/Light/EntitySystems/LightReplacerSystem.cs b/Content.Server/Light/EntitySystems/LightReplacerSystem.cs index e0d55f1926..5fef1809d0 100644 --- a/Content.Server/Light/EntitySystems/LightReplacerSystem.cs +++ b/Content.Server/Light/EntitySystems/LightReplacerSystem.cs @@ -131,8 +131,8 @@ namespace Content.Server.Light.EntitySystems var wasReplaced = _poweredLight.ReplaceBulb(fixtureUid, bulb, fixture); if (wasReplaced) { - SoundSystem.Play(Filter.Pvs(replacerUid), replacer.Sound.GetSound(), - replacerUid, AudioParams.Default.WithVolume(-4f)); + SoundSystem.Play(replacer.Sound.GetSound(), + Filter.Pvs(replacerUid), replacerUid, AudioParams.Default.WithVolume(-4f)); } diff --git a/Content.Server/Light/EntitySystems/MatchstickSystem.cs b/Content.Server/Light/EntitySystems/MatchstickSystem.cs index ffd722cb9d..9b0fa1652a 100644 --- a/Content.Server/Light/EntitySystems/MatchstickSystem.cs +++ b/Content.Server/Light/EntitySystems/MatchstickSystem.cs @@ -65,9 +65,8 @@ namespace Content.Server.Light.EntitySystems public void Ignite(MatchstickComponent component, EntityUid user) { // Play Sound - SoundSystem.Play( - Filter.Pvs(component.Owner), component.IgniteSound.GetSound(), component.Owner, - AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f)); + SoundSystem.Play(component.IgniteSound.GetSound(), Filter.Pvs(component.Owner), + component.Owner, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f)); // Change state SetState(component, SmokableState.Lit); diff --git a/Content.Server/Light/EntitySystems/PoweredLightSystem.cs b/Content.Server/Light/EntitySystems/PoweredLightSystem.cs index b6314c0ce3..dc4a65c3ea 100644 --- a/Content.Server/Light/EntitySystems/PoweredLightSystem.cs +++ b/Content.Server/Light/EntitySystems/PoweredLightSystem.cs @@ -114,7 +114,7 @@ namespace Content.Server.Light.EntitySystems _adminLogger.Add(LogType.Damaged, $"{ToPrettyString(args.User):user} burned their hand on {ToPrettyString(args.Target):target} and received {damage.Total:damage} damage"); - SoundSystem.Play(Filter.Pvs(uid), light.BurnHandSound.GetSound(), uid); + SoundSystem.Play(light.BurnHandSound.GetSound(), Filter.Pvs(uid), uid); args.Handled = true; return; @@ -253,7 +253,7 @@ namespace Content.Server.Light.EntitySystems if (time > light.LastThunk + ThunkDelay) { light.LastThunk = time; - SoundSystem.Play(Filter.Pvs(uid), light.TurnOnSound.GetSound(), uid, AudioParams.Default.WithVolume(-10f)); + SoundSystem.Play(light.TurnOnSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-10f)); } } else diff --git a/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs b/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs index fa533f97fe..f67b4870dc 100644 --- a/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs +++ b/Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs @@ -63,7 +63,7 @@ namespace Content.Server.Light.EntitySystems if (EntityManager.TryGetComponent(flashlight.Owner, out AppearanceComponent? appearance)) appearance.SetData(UnpoweredFlashlightVisuals.LightOn, flashlight.LightOn); - SoundSystem.Play(Filter.Pvs(light.Owner), flashlight.ToggleSound.GetSound(), flashlight.Owner); + SoundSystem.Play(flashlight.ToggleSound.GetSound(), Filter.Pvs(light.Owner), flashlight.Owner); RaiseLocalEvent(flashlight.Owner, new LightToggleEvent(flashlight.LightOn)); _actionsSystem.SetToggled(flashlight.ToggleAction, flashlight.LightOn); diff --git a/Content.Server/Lock/LockSystem.cs b/Content.Server/Lock/LockSystem.cs index c004879556..4d3d8464bc 100644 --- a/Content.Server/Lock/LockSystem.cs +++ b/Content.Server/Lock/LockSystem.cs @@ -82,7 +82,7 @@ namespace Content.Server.Lock if(lockComp.LockSound != null) { - SoundSystem.Play(Filter.Pvs(lockComp.Owner), lockComp.LockSound.GetSound(), lockComp.Owner, AudioParams.Default.WithVolume(-5)); + SoundSystem.Play(lockComp.LockSound.GetSound(), Filter.Pvs(lockComp.Owner), lockComp.Owner, AudioParams.Default.WithVolume(-5)); } if (EntityManager.TryGetComponent(lockComp.Owner, out AppearanceComponent? appearanceComp)) @@ -105,7 +105,7 @@ namespace Content.Server.Lock if (lockComp.UnlockSound != null) { - SoundSystem.Play(Filter.Pvs(lockComp.Owner), lockComp.UnlockSound.GetSound(), lockComp.Owner, AudioParams.Default.WithVolume(-5)); + SoundSystem.Play(lockComp.UnlockSound.GetSound(), Filter.Pvs(lockComp.Owner), lockComp.Owner, AudioParams.Default.WithVolume(-5)); } if (EntityManager.TryGetComponent(lockComp.Owner, out AppearanceComponent? appearanceComp)) @@ -186,7 +186,7 @@ namespace Content.Server.Lock { if (component.UnlockSound != null) { - SoundSystem.Play(Filter.Pvs(component.Owner), component.UnlockSound.GetSound(), component.Owner, AudioParams.Default.WithVolume(-5)); + SoundSystem.Play(component.UnlockSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioParams.Default.WithVolume(-5)); } if (EntityManager.TryGetComponent(component.Owner, out AppearanceComponent? appearanceComp)) diff --git a/Content.Server/Magic/MagicSystem.cs b/Content.Server/Magic/MagicSystem.cs index 53aecb98a5..ddab1d2cb4 100644 --- a/Content.Server/Magic/MagicSystem.cs +++ b/Content.Server/Magic/MagicSystem.cs @@ -215,7 +215,7 @@ public sealed class MagicSystem : EntitySystem transform.WorldPosition = args.Target.Position; transform.AttachToGridOrMap(); - SoundSystem.Play(Filter.Pvs(args.Target), args.BlinkSound.GetSound()); + SoundSystem.Play(args.BlinkSound.GetSound(), Filter.Pvs(args.Target)); args.Handled = true; } @@ -232,7 +232,7 @@ public sealed class MagicSystem : EntitySystem var transform = Transform(args.Performer); var coords = transform.Coordinates; - SoundSystem.Play(Filter.Pvs(coords), args.KnockSound.GetSound(), AudioParams.Default.WithVolume(args.KnockVolume)); + SoundSystem.Play(args.KnockSound.GetSound(), Filter.Pvs(coords), AudioParams.Default.WithVolume(args.KnockVolume)); //Look for doors and don't open them if they're already open. foreach (var entity in _lookup.GetEntitiesInRange(coords, args.Range)) diff --git a/Content.Server/Medical/HealingSystem.cs b/Content.Server/Medical/HealingSystem.cs index 64e1057df6..5e7f6c265a 100644 --- a/Content.Server/Medical/HealingSystem.cs +++ b/Content.Server/Medical/HealingSystem.cs @@ -65,7 +65,7 @@ public sealed class HealingSystem : EntitySystem if (args.Component.HealingEndSound != null) { - SoundSystem.Play(Filter.Pvs(uid, entityManager:EntityManager), args.Component.HealingEndSound.GetSound(), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f)); + SoundSystem.Play(args.Component.HealingEndSound.GetSound(), Filter.Pvs(uid, entityManager:EntityManager), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f)); } } @@ -119,7 +119,7 @@ public sealed class HealingSystem : EntitySystem if (component.HealingBeginSound != null) { - SoundSystem.Play(Filter.Pvs(uid, entityManager:EntityManager), component.HealingBeginSound.GetSound(), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f)); + SoundSystem.Play(component.HealingBeginSound.GetSound(), Filter.Pvs(uid, entityManager:EntityManager), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f)); } _doAfter.DoAfter(new DoAfterEventArgs(user, component.Delay, component.CancelToken.Token, target) diff --git a/Content.Server/Medical/VomitSystem.cs b/Content.Server/Medical/VomitSystem.cs index c9a9d88c19..9367243380 100644 --- a/Content.Server/Medical/VomitSystem.cs +++ b/Content.Server/Medical/VomitSystem.cs @@ -50,7 +50,7 @@ namespace Content.Server.Medical var puddleComp = Comp(puddle); - SoundSystem.Play(Filter.Pvs(uid), "/Audio/Effects/Diseases/vomiting.ogg", uid, AudioHelpers.WithVariation(0.2f).WithVolume(-4f)); + SoundSystem.Play("/Audio/Effects/Diseases/vomiting.ogg", Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.2f).WithVolume(-4f)); _popupSystem.PopupEntity(Loc.GetString("disease-vomit", ("person", uid)), uid, Filter.Pvs(uid)); // Get the solution of the puddle we spawned diff --git a/Content.Server/Morgue/Components/CrematoriumEntityStorageComponent.cs b/Content.Server/Morgue/Components/CrematoriumEntityStorageComponent.cs index c942dc85c9..668342d5c5 100644 --- a/Content.Server/Morgue/Components/CrematoriumEntityStorageComponent.cs +++ b/Content.Server/Morgue/Components/CrematoriumEntityStorageComponent.cs @@ -48,7 +48,7 @@ namespace Content.Server.Morgue.Components if (Cooking) return; if (Open) return; - SoundSystem.Play(Filter.Pvs(Owner), _cremateStartSound.GetSound(), Owner); + SoundSystem.Play(_cremateStartSound.GetSound(), Filter.Pvs(Owner), Owner); Cremate(); } @@ -62,7 +62,7 @@ namespace Content.Server.Morgue.Components appearanceComponent.SetData(CrematoriumVisuals.Burning, true); Cooking = true; - SoundSystem.Play(Filter.Pvs(Owner), _crematingSound.GetSound(), Owner); + SoundSystem.Play(_crematingSound.GetSound(), Filter.Pvs(Owner), Owner); _cremateCancelToken?.Cancel(); @@ -90,7 +90,7 @@ namespace Content.Server.Morgue.Components TryOpenStorage(Owner); - SoundSystem.Play(Filter.Pvs(Owner), _cremateFinishSound.GetSound(), Owner); + SoundSystem.Play(_cremateFinishSound.GetSound(), Filter.Pvs(Owner), Owner); }, _cremateCancelToken.Token); } diff --git a/Content.Server/Morgue/Components/MorgueEntityStorageComponent.cs b/Content.Server/Morgue/Components/MorgueEntityStorageComponent.cs index 880c5b856c..a387303d3f 100644 --- a/Content.Server/Morgue/Components/MorgueEntityStorageComponent.cs +++ b/Content.Server/Morgue/Components/MorgueEntityStorageComponent.cs @@ -166,7 +166,7 @@ namespace Content.Server.Morgue.Components if (DoSoulBeep && _entMan.TryGetComponent(Owner, out var appearance) && appearance.TryGetData(MorgueVisuals.HasSoul, out bool hasSoul) && hasSoul) { - SoundSystem.Play(Filter.Pvs(Owner), _occupantHasSoulAlarmSound.GetSound(), Owner); + SoundSystem.Play(_occupantHasSoulAlarmSound.GetSound(), Filter.Pvs(Owner), Owner); } } } diff --git a/Content.Server/Nuke/NukeSystem.cs b/Content.Server/Nuke/NukeSystem.cs index f45ea949b6..bd1f3ca3ca 100644 --- a/Content.Server/Nuke/NukeSystem.cs +++ b/Content.Server/Nuke/NukeSystem.cs @@ -216,7 +216,7 @@ namespace Content.Server.Nuke // play alert sound if time is running out if (nuke.RemainingTime <= nuke.AlertSoundTime && !nuke.PlayedAlertSound) { - nuke.AlertAudioStream = SoundSystem.Play(Filter.Broadcast(), nuke.AlertSound.GetSound()); + nuke.AlertAudioStream = SoundSystem.Play(nuke.AlertSound.GetSound(), Filter.Broadcast()); nuke.PlayedAlertSound = true; } @@ -312,8 +312,8 @@ namespace Content.Server.Nuke if (!Resolve(uid, ref component)) return; - SoundSystem.Play(Filter.Pvs(uid), sound.GetSound(), - uid, AudioHelpers.WithVariation(varyPitch).WithVolume(-5f)); + SoundSystem.Play(sound.GetSound(), + Filter.Pvs(uid), uid, AudioHelpers.WithVariation(varyPitch).WithVolume(-5f)); } #region Public API @@ -344,7 +344,7 @@ namespace Content.Server.Nuke _chatSystem.DispatchStationAnnouncement(uid, announcement, sender, false, Color.Red); // todo: move it to announcements system - SoundSystem.Play(Filter.Broadcast(), component.ArmSound.GetSound()); + SoundSystem.Play(component.ArmSound.GetSound(), Filter.Broadcast()); component.Status = NukeStatus.ARMED; UpdateUserInterface(uid, component); @@ -373,7 +373,7 @@ namespace Content.Server.Nuke _chatSystem.DispatchStationAnnouncement(uid, announcement, sender, false); // todo: move it to announcements system - SoundSystem.Play(Filter.Broadcast(), component.DisarmSound.GetSound()); + SoundSystem.Play(component.DisarmSound.GetSound(), Filter.Broadcast()); // disable sound and reset it component.PlayedAlertSound = false; diff --git a/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs b/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs index 0b2cafb49b..4e382cff2b 100644 --- a/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs @@ -21,7 +21,7 @@ namespace Content.Server.Nutrition.EntitySystems protected override void SplattedCreamPie(EntityUid uid, CreamPieComponent creamPie) { - SoundSystem.Play(Filter.Pvs(creamPie.Owner), creamPie.Sound.GetSound(), creamPie.Owner, AudioHelpers.WithVariation(0.125f)); + SoundSystem.Play(creamPie.Sound.GetSound(), Filter.Pvs(creamPie.Owner), creamPie.Owner, AudioHelpers.WithVariation(0.125f)); if (EntityManager.TryGetComponent(creamPie.Owner, out var foodComp) && _solutionsSystem.TryGetSolution(creamPie.Owner, foodComp.SolutionName, out var solution)) { diff --git a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs index 89e63efb06..a56094a5d6 100644 --- a/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/DrinkSystem.cs @@ -110,7 +110,7 @@ namespace Content.Server.Nutrition.EntitySystems if (!component.Opened) { //Do the opening stuff like playing the sounds. - SoundSystem.Play(Filter.Pvs(args.User), component.OpenSounds.GetSound(), args.User, AudioParams.Default); + SoundSystem.Play(component.OpenSounds.GetSound(), Filter.Pvs(args.User), args.User, AudioParams.Default); SetOpen(uid, true, component); return; @@ -132,7 +132,7 @@ namespace Content.Server.Nutrition.EntitySystems var solution = _solutionContainerSystem.Drain(uid, interactions, interactions.DrainAvailable); _spillableSystem.SpillAt(uid, solution, "PuddleSmear"); - SoundSystem.Play(Filter.Pvs(uid), component.BurstSound.GetSound(), uid, AudioParams.Default.WithVolume(-4)); + SoundSystem.Play(component.BurstSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-4)); } } @@ -314,7 +314,7 @@ namespace Content.Server.Nutrition.EntitySystems Loc.GetString("drink-component-try-use-drink-success-slurp"), args.User, Filter.Pvs(args.User)); } - SoundSystem.Play(Filter.Pvs(uid), args.Drink.UseSound.GetSound(), uid, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(args.Drink.UseSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-2f)); drained.DoEntityReaction(uid, ReactionMethod.Ingestion); _stomachSystem.TryTransferSolution(firstStomach.Value.Comp.Owner, drained, firstStomach.Value.Comp); diff --git a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs index fa18ee59e4..ff46bf4b73 100644 --- a/Content.Server/Nutrition/EntitySystems/FoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/FoodSystem.cs @@ -196,7 +196,7 @@ namespace Content.Server.Nutrition.EntitySystems _popupSystem.PopupEntity(Loc.GetString(args.Food.EatMessage, ("food", args.Food.Owner)), args.User, Filter.Entities(args.User)); } - SoundSystem.Play(Filter.Pvs(uid), args.Food.UseSound.GetSound(), uid, AudioParams.Default.WithVolume(-1f)); + SoundSystem.Play(args.Food.UseSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-1f)); // Try to break all used utensils foreach (var utensil in args.Utensils) @@ -299,7 +299,7 @@ namespace Content.Server.Nutrition.EntitySystems foodSolution.DoEntityReaction(uid, ReactionMethod.Ingestion); _stomachSystem.TryTransferSolution(((IComponent) firstStomach.Value.Comp).Owner, foodSolution, firstStomach.Value.Comp); - SoundSystem.Play(Filter.Pvs(target), food.UseSound.GetSound(), target, AudioParams.Default.WithVolume(-1f)); + SoundSystem.Play(food.UseSound.GetSound(), Filter.Pvs(target), target, AudioParams.Default.WithVolume(-1f)); if (string.IsNullOrEmpty(food.TrashPrototype)) EntityManager.QueueDeleteEntity(food.Owner); diff --git a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs index c6fb4cf582..c0ba14b1bd 100644 --- a/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs @@ -72,8 +72,8 @@ namespace Content.Server.Nutrition.EntitySystems } } - SoundSystem.Play(Filter.Pvs(uid), component.Sound.GetSound(), transform.Coordinates, - AudioParams.Default.WithVolume(-2)); + SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(uid), + transform.Coordinates, AudioParams.Default.WithVolume(-2)); component.Count--; // If someone makes food proto with 1 slice... diff --git a/Content.Server/Nutrition/EntitySystems/UtensilSystem.cs b/Content.Server/Nutrition/EntitySystems/UtensilSystem.cs index c78769af49..3d8ac51423 100644 --- a/Content.Server/Nutrition/EntitySystems/UtensilSystem.cs +++ b/Content.Server/Nutrition/EntitySystems/UtensilSystem.cs @@ -66,7 +66,7 @@ namespace Content.Server.Nutrition.EntitySystems if (_robustRandom.Prob(component.BreakChance)) { - SoundSystem.Play(Filter.Pvs(userUid), component.BreakSound.GetSound(), userUid, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(component.BreakSound.GetSound(), Filter.Pvs(userUid), userUid, AudioParams.Default.WithVolume(-2f)); EntityManager.DeleteEntity(component.Owner); } } diff --git a/Content.Server/PDA/Ringer/RingerSystem.cs b/Content.Server/PDA/Ringer/RingerSystem.cs index 5422ef15a8..95d138a9d2 100644 --- a/Content.Server/PDA/Ringer/RingerSystem.cs +++ b/Content.Server/PDA/Ringer/RingerSystem.cs @@ -106,11 +106,9 @@ namespace Content.Server.PDA.Ringer ringer.TimeElapsed -= NoteDelay; var ringerXform = Transform(ringer.Owner); - SoundSystem.Play( + SoundSystem.Play(GetSound(ringer.Ringtone[ringer.NoteCount]), Filter.Empty().AddInRange(ringerXform.MapPosition, ringer.Range), - GetSound(ringer.Ringtone[ringer.NoteCount]), - ringer.Owner, - AudioParams.Default.WithMaxDistance(ringer.Range).WithVolume(ringer.Volume)); + ringer.Owner, AudioParams.Default.WithMaxDistance(ringer.Range).WithVolume(ringer.Volume)); ringer.NoteCount++; diff --git a/Content.Server/Plants/Systems/PottedPlantHideSystem.cs b/Content.Server/Plants/Systems/PottedPlantHideSystem.cs index 4dde3acc48..091b73e481 100644 --- a/Content.Server/Plants/Systems/PottedPlantHideSystem.cs +++ b/Content.Server/Plants/Systems/PottedPlantHideSystem.cs @@ -58,7 +58,7 @@ namespace Content.Server.Plants.Systems if (!Resolve(uid, ref component)) return; - SoundSystem.Play(Filter.Pvs(uid), component.RustleSound.GetSound(), uid, AudioHelpers.WithVariation(0.25f)); + SoundSystem.Play(component.RustleSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.25f)); } } } diff --git a/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs b/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs index 9cf4808c14..8bc7452622 100644 --- a/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs +++ b/Content.Server/PneumaticCannon/PneumaticCannonSystem.cs @@ -161,7 +161,7 @@ namespace Content.Server.PneumaticCannon { args.User.PopupMessage(Loc.GetString("pneumatic-cannon-component-fire-no-gas", ("cannon", component.Owner))); - SoundSystem.Play(Filter.Pvs(args.Used), "/Audio/Items/hiss.ogg", args.Used, AudioParams.Default); + SoundSystem.Play("/Audio/Items/hiss.ogg", Filter.Pvs(args.Used), args.Used, AudioParams.Default); return; } AddToQueue(component, args.User, args.ClickLocation); @@ -174,7 +174,7 @@ namespace Content.Server.PneumaticCannon if (storage.StoredEntities == null) return; if (storage.StoredEntities.Count == 0) { - SoundSystem.Play(Filter.Pvs((comp).Owner), "/Audio/Weapons/click.ogg", ((IComponent) comp).Owner, AudioParams.Default); + SoundSystem.Play("/Audio/Weapons/click.ogg", Filter.Pvs((comp).Owner), ((IComponent) comp).Owner, AudioParams.Default); return; } @@ -211,7 +211,7 @@ namespace Content.Server.PneumaticCannon { data.User.PopupMessage(Loc.GetString("pneumatic-cannon-component-fire-no-gas", ("cannon", comp.Owner))); - SoundSystem.Play(Filter.Pvs(((IComponent) comp).Owner), "/Audio/Items/hiss.ogg", ((IComponent) comp).Owner, AudioParams.Default); + SoundSystem.Play("/Audio/Items/hiss.ogg", Filter.Pvs(((IComponent) comp).Owner), ((IComponent) comp).Owner, AudioParams.Default); return; } @@ -227,7 +227,7 @@ namespace Content.Server.PneumaticCannon var ent = _random.Pick(storage.StoredEntities); _storageSystem.RemoveAndDrop(comp.Owner, ent, storage); - SoundSystem.Play(Filter.Pvs(data.User), comp.FireSound.GetSound(), ((IComponent) comp).Owner, AudioParams.Default); + SoundSystem.Play(comp.FireSound.GetSound(), Filter.Pvs(data.User), ((IComponent) comp).Owner, AudioParams.Default); if (EntityManager.HasComponent(data.User)) { var kick = Vector2.One * data.Strength; diff --git a/Content.Server/Power/EntitySystems/ApcSystem.cs b/Content.Server/Power/EntitySystems/ApcSystem.cs index 563a4719f6..6d02e18131 100644 --- a/Content.Server/Power/EntitySystems/ApcSystem.cs +++ b/Content.Server/Power/EntitySystems/ApcSystem.cs @@ -68,7 +68,7 @@ namespace Content.Server.Power.EntitySystems battery.CanDischarge = apc.MainBreakerEnabled; UpdateUIState(uid, apc); - SoundSystem.Play(Filter.Pvs(uid), apc.OnReceiveMessageSound.GetSound(), uid, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(apc.OnReceiveMessageSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-2f)); } private void OnEmagged(EntityUid uid, ApcComponent comp, GotEmaggedEvent args) diff --git a/Content.Server/RCD/Systems/RCDSystem.cs b/Content.Server/RCD/Systems/RCDSystem.cs index c4743c3430..1cbf85eb00 100644 --- a/Content.Server/RCD/Systems/RCDSystem.cs +++ b/Content.Server/RCD/Systems/RCDSystem.cs @@ -149,7 +149,7 @@ namespace Content.Server.RCD.Systems return; //I don't know why this would happen, but sure I guess. Get out of here invalid state! } - SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), rcd.SuccessSound.GetSound(), rcd.Owner); + SoundSystem.Play(rcd.SuccessSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), rcd.Owner); rcd.CurrentAmmo--; args.Handled = true; } @@ -240,7 +240,7 @@ namespace Content.Server.RCD.Systems private void NextMode(EntityUid uid, RCDComponent rcd, EntityUid user) { - SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), rcd.SwapModeSound.GetSound(), uid); + SoundSystem.Play(rcd.SwapModeSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), uid); var mode = (int) rcd.Mode; mode = ++mode % RCDModeCount; diff --git a/Content.Server/Radiation/RadiationPulseComponent.cs b/Content.Server/Radiation/RadiationPulseComponent.cs index c2400ce4f8..ee62b0eaea 100644 --- a/Content.Server/Radiation/RadiationPulseComponent.cs +++ b/Content.Server/Radiation/RadiationPulseComponent.cs @@ -80,7 +80,7 @@ namespace Content.Server.Radiation _endTime = currentTime + TimeSpan.FromSeconds(_duration); } - SoundSystem.Play(Filter.Pvs(Owner), Sound.GetSound(), Owner); + SoundSystem.Play(Sound.GetSound(), Filter.Pvs(Owner), Owner); Dirty(); } diff --git a/Content.Server/Recycling/RecyclerSystem.cs b/Content.Server/Recycling/RecyclerSystem.cs index c77f5111a1..bc6801737a 100644 --- a/Content.Server/Recycling/RecyclerSystem.cs +++ b/Content.Server/Recycling/RecyclerSystem.cs @@ -114,7 +114,7 @@ namespace Content.Server.Recycling if (component.Sound != null && (_timing.CurTime - component.LastSound).TotalSeconds > RecyclerSoundCooldown) { - SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.Sound.GetSound(), component.Owner, AudioHelpers.WithVariation(0.01f).WithVolume(-3)); + SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner, AudioHelpers.WithVariation(0.01f).WithVolume(-3)); component.LastSound = _timing.CurTime; } } diff --git a/Content.Server/Remotes/DoorRemoteSystem.cs b/Content.Server/Remotes/DoorRemoteSystem.cs index 95b292ddae..821968e8cc 100644 --- a/Content.Server/Remotes/DoorRemoteSystem.cs +++ b/Content.Server/Remotes/DoorRemoteSystem.cs @@ -82,7 +82,7 @@ namespace Content.Server.Remotes } else if (doorComponent.DenySound != null) { - SoundSystem.Play(Filter.Pvs(args.Target.Value, entityManager: EntityManager), doorComponent.DenySound.GetSound(), args.Target.Value); + SoundSystem.Play(doorComponent.DenySound.GetSound(), Filter.Pvs(args.Target.Value, entityManager: EntityManager), args.Target.Value); } } } diff --git a/Content.Server/RoundEnd/RoundEndSystem.cs b/Content.Server/RoundEnd/RoundEndSystem.cs index b40d031ad5..f528fe5540 100644 --- a/Content.Server/RoundEnd/RoundEndSystem.cs +++ b/Content.Server/RoundEnd/RoundEndSystem.cs @@ -84,7 +84,7 @@ namespace Content.Server.RoundEnd _chatSystem.DispatchGlobalStationAnnouncement(Loc.GetString("round-end-system-shuttle-called-announcement",("minutes", countdownTime.Minutes)), Loc.GetString("Station"), false, Color.Gold); - SoundSystem.Play(Filter.Broadcast(), "/Audio/Announcements/shuttlecalled.ogg"); + SoundSystem.Play("/Audio/Announcements/shuttlecalled.ogg", Filter.Broadcast()); ExpectedCountdownEnd = _gameTiming.CurTime + countdownTime; Timer.Spawn(countdownTime, EndRound, _countdownTokenSource.Token); @@ -114,7 +114,7 @@ namespace Content.Server.RoundEnd _chatSystem.DispatchGlobalStationAnnouncement(Loc.GetString("round-end-system-shuttle-recalled-announcement"), Loc.GetString("Station"), false, colorOverride: Color.Gold); - SoundSystem.Play(Filter.Broadcast(), "/Audio/Announcements/shuttlerecalled.ogg"); + SoundSystem.Play("/Audio/Announcements/shuttlerecalled.ogg", Filter.Broadcast()); ExpectedCountdownEnd = null; ActivateCooldown(); diff --git a/Content.Server/Singularity/Components/ServerSingularityComponent.cs b/Content.Server/Singularity/Components/ServerSingularityComponent.cs index 41608b6e06..b20bba3f96 100644 --- a/Content.Server/Singularity/Components/ServerSingularityComponent.cs +++ b/Content.Server/Singularity/Components/ServerSingularityComponent.cs @@ -83,7 +83,7 @@ namespace Content.Server.Singularity.Components audioParams.Loop = true; audioParams.MaxDistance = 20f; audioParams.Volume = 5; - SoundSystem.Play(Filter.Pvs(Owner), _singularityFormingSound.GetSound(), Owner); + SoundSystem.Play(_singularityFormingSound.GetSound(), Filter.Pvs(Owner), Owner); _singularitySystem.ChangeSingularityLevel(this, 1); } @@ -91,7 +91,7 @@ namespace Content.Server.Singularity.Components protected override void Shutdown() { base.Shutdown(); - SoundSystem.Play(Filter.Pvs(Owner), _singularityCollapsingSound.GetSound(), _entMan.GetComponent(Owner).Coordinates); + SoundSystem.Play(_singularityCollapsingSound.GetSound(), Filter.Pvs(Owner), _entMan.GetComponent(Owner).Coordinates); } } } diff --git a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs index 8989324504..71d180d67d 100644 --- a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs +++ b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs @@ -196,8 +196,8 @@ namespace Content.Server.Singularity.EntitySystems // TODO: Move to projectile's code. Timer.Spawn(3000, () => EntityManager.DeleteEntity(projectile)); - SoundSystem.Play(Filter.Pvs(component.Owner), component.FireSound.GetSound(), component.Owner, - AudioHelpers.WithVariation(EmitterComponent.Variation).WithVolume(EmitterComponent.Volume).WithMaxDistance(EmitterComponent.Distance)); + SoundSystem.Play(component.FireSound.GetSound(), Filter.Pvs(component.Owner), + component.Owner, AudioHelpers.WithVariation(EmitterComponent.Variation).WithVolume(EmitterComponent.Volume).WithMaxDistance(EmitterComponent.Distance)); } private void UpdateAppearance(EmitterComponent component) diff --git a/Content.Server/Slippery/SlipperySystem.cs b/Content.Server/Slippery/SlipperySystem.cs index 31fe94ebe5..e0e5ba7276 100644 --- a/Content.Server/Slippery/SlipperySystem.cs +++ b/Content.Server/Slippery/SlipperySystem.cs @@ -9,7 +9,7 @@ namespace Content.Server.Slippery { protected override void PlaySound(SlipperyComponent component) { - SoundSystem.Play(Filter.Pvs(component.Owner), component.SlipSound.GetSound(), component.Owner, AudioHelpers.WithVariation(0.2f)); + SoundSystem.Play(component.SlipSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioHelpers.WithVariation(0.2f)); } } } diff --git a/Content.Server/Sound/EmitSoundSystem.cs b/Content.Server/Sound/EmitSoundSystem.cs index 901a1f76e1..aed10d427b 100644 --- a/Content.Server/Sound/EmitSoundSystem.cs +++ b/Content.Server/Sound/EmitSoundSystem.cs @@ -86,7 +86,7 @@ namespace Content.Server.Sound private void TryEmitSound(BaseEmitSoundComponent component) { var audioParams = component.AudioParams.WithPitchScale((float) _random.NextGaussian(1, component.PitchVariation)); - SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.Sound.GetSound(), component.Owner, audioParams); + SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner, audioParams); } } } diff --git a/Content.Server/Speech/SpeechNoiseSystem.cs b/Content.Server/Speech/SpeechNoiseSystem.cs index 10685052da..aacc987a3d 100644 --- a/Content.Server/Speech/SpeechNoiseSystem.cs +++ b/Content.Server/Speech/SpeechNoiseSystem.cs @@ -65,7 +65,7 @@ namespace Content.Server.Speech var pitchedAudioParams = component.AudioParams.WithPitchScale(scale); component.LastTimeSoundPlayed = currentTime; - SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), contextSound, uid, pitchedAudioParams); + SoundSystem.Play(contextSound, Filter.Pvs(uid, entityManager: EntityManager), uid, pitchedAudioParams); } } } diff --git a/Content.Server/Speech/VocalSystem.cs b/Content.Server/Speech/VocalSystem.cs index e78c799353..eaae34913d 100644 --- a/Content.Server/Speech/VocalSystem.cs +++ b/Content.Server/Speech/VocalSystem.cs @@ -73,7 +73,7 @@ public sealed class VocalSystem : EntitySystem if (_random.Prob(component.WilhelmProbability)) { - SoundSystem.Play(Filter.Pvs(uid), component.Wilhelm.GetSound(), uid, component.AudioParams); + SoundSystem.Play(component.Wilhelm.GetSound(), Filter.Pvs(uid), uid, component.AudioParams); return true; } @@ -83,10 +83,10 @@ public sealed class VocalSystem : EntitySystem switch (sex) { case Sex.Male: - SoundSystem.Play(Filter.Pvs(uid), component.MaleScream.GetSound(), uid, pitchedParams); + SoundSystem.Play(component.MaleScream.GetSound(), Filter.Pvs(uid), uid, pitchedParams); break; case Sex.Female: - SoundSystem.Play(Filter.Pvs(uid), component.FemaleScream.GetSound(), uid, pitchedParams); + SoundSystem.Play(component.FemaleScream.GetSound(), Filter.Pvs(uid), uid, pitchedParams); break; default: throw new ArgumentOutOfRangeException(); diff --git a/Content.Server/StationEvents/Events/GasLeak.cs b/Content.Server/StationEvents/Events/GasLeak.cs index fa5984fdc1..ab59f6a91b 100644 --- a/Content.Server/StationEvents/Events/GasLeak.cs +++ b/Content.Server/StationEvents/Events/GasLeak.cs @@ -158,8 +158,8 @@ namespace Content.Server.StationEvents.Events // Don't want it to be so obnoxious as to instantly murder anyone in the area but enough that // it COULD start potentially start a bigger fire. - atmosphereSystem.HotspotExpose(_entityManager.GetComponent(_targetGrid).GridEntityId, _targetTile, 700f, 50f, true); - SoundSystem.Play(Filter.Pvs(_targetCoords), "/Audio/Effects/sparks4.ogg", _targetCoords); + atmosphereSystem.HotspotExpose(_entityManager.GetComponent(_targetGrid).GridID, _targetTile, 700f, 50f, true); + SoundSystem.Play("/Audio/Effects/sparks4.ogg", Filter.Pvs(_targetCoords), _targetCoords); } } } diff --git a/Content.Server/StationEvents/Events/PowerGridCheck.cs b/Content.Server/StationEvents/Events/PowerGridCheck.cs index 25c8445105..1076bd7faf 100644 --- a/Content.Server/StationEvents/Events/PowerGridCheck.cs +++ b/Content.Server/StationEvents/Events/PowerGridCheck.cs @@ -103,7 +103,7 @@ namespace Content.Server.StationEvents.Events _announceCancelToken = new CancellationTokenSource(); Timer.Spawn(3000, () => { - SoundSystem.Play(Filter.Broadcast(), "/Audio/Announcements/power_on.ogg", AudioParams); + SoundSystem.Play("/Audio/Announcements/power_on.ogg", Filter.Broadcast(), AudioParams); }, _announceCancelToken.Token); _unpowered.Clear(); diff --git a/Content.Server/StationEvents/Events/StationEvent.cs b/Content.Server/StationEvents/Events/StationEvent.cs index 478adc7982..0f8872a1e0 100644 --- a/Content.Server/StationEvents/Events/StationEvent.cs +++ b/Content.Server/StationEvents/Events/StationEvent.cs @@ -147,7 +147,7 @@ namespace Content.Server.StationEvents.Events if (StartAudio != null) { - SoundSystem.Play(Filter.Broadcast(), StartAudio.GetSound(), AudioParams); + SoundSystem.Play(StartAudio.GetSound(), Filter.Broadcast(), AudioParams); } Announced = true; @@ -170,7 +170,7 @@ namespace Content.Server.StationEvents.Events if (EndAudio != null) { - SoundSystem.Play(Filter.Broadcast(), EndAudio.GetSound(), AudioParams); + SoundSystem.Play(EndAudio.GetSound(), Filter.Broadcast(), AudioParams); } Started = false; diff --git a/Content.Server/Storage/Components/CursedEntityStorageComponent.cs b/Content.Server/Storage/Components/CursedEntityStorageComponent.cs index 33cb630bf1..87f53c320d 100644 --- a/Content.Server/Storage/Components/CursedEntityStorageComponent.cs +++ b/Content.Server/Storage/Components/CursedEntityStorageComponent.cs @@ -47,8 +47,8 @@ namespace Content.Server.Storage.Components locker.Insert(entity); } - SoundSystem.Play(Filter.Pvs(Owner), _cursedSound.GetSound(), Owner, AudioHelpers.WithVariation(0.125f)); - SoundSystem.Play(Filter.Pvs(lockerEnt), _cursedLockerSound.GetSound(), lockerEnt, AudioHelpers.WithVariation(0.125f)); + SoundSystem.Play(_cursedSound.GetSound(), Filter.Pvs(Owner), Owner, AudioHelpers.WithVariation(0.125f)); + SoundSystem.Play(_cursedLockerSound.GetSound(), Filter.Pvs(lockerEnt), lockerEnt, AudioHelpers.WithVariation(0.125f)); } } } diff --git a/Content.Server/Storage/Components/EntityStorageComponent.cs b/Content.Server/Storage/Components/EntityStorageComponent.cs index e301ed9204..8f0f2d13ee 100644 --- a/Content.Server/Storage/Components/EntityStorageComponent.cs +++ b/Content.Server/Storage/Components/EntityStorageComponent.cs @@ -200,7 +200,7 @@ namespace Content.Server.Storage.Components } ModifyComponents(); - SoundSystem.Play(Filter.Pvs(Owner), _closeSound.GetSound(), Owner); + SoundSystem.Play(_closeSound.GetSound(), Filter.Pvs(Owner), Owner); LastInternalOpenAttempt = default; } @@ -251,7 +251,7 @@ namespace Content.Server.Storage.Components Open = true; EntitySystem.Get().EmptyContents(Owner, this); ModifyComponents(); - SoundSystem.Play(Filter.Pvs(Owner), _openSound.GetSound(), Owner); + SoundSystem.Play(_openSound.GetSound(), Filter.Pvs(Owner), Owner); } private void ModifyComponents() diff --git a/Content.Server/Storage/EntitySystems/SpawnItemsOnUseSystem.cs b/Content.Server/Storage/EntitySystems/SpawnItemsOnUseSystem.cs index b9805abbb5..3a8f67673b 100644 --- a/Content.Server/Storage/EntitySystems/SpawnItemsOnUseSystem.cs +++ b/Content.Server/Storage/EntitySystems/SpawnItemsOnUseSystem.cs @@ -35,7 +35,7 @@ namespace Content.Server.Storage.EntitySystems } if (component.Sound != null) - SoundSystem.Play(Filter.Pvs(uid), component.Sound.GetSound(), uid); + SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(uid), uid); component.Uses--; if (component.Uses == 0) diff --git a/Content.Server/Storage/EntitySystems/StorageSystem.cs b/Content.Server/Storage/EntitySystems/StorageSystem.cs index f842d115d2..38da912647 100644 --- a/Content.Server/Storage/EntitySystems/StorageSystem.cs +++ b/Content.Server/Storage/EntitySystems/StorageSystem.cs @@ -290,7 +290,7 @@ namespace Content.Server.Storage.EntitySystems if (successfullyInserted.Count > 0) { if (storageComp.StorageInsertSound is not null) - SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), storageComp.StorageInsertSound.GetSound(), uid, AudioParams.Default); + SoundSystem.Play(storageComp.StorageInsertSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), uid, AudioParams.Default); RaiseNetworkEvent(new AnimateInsertingEntitiesEvent(uid, successfullyInserted, successfullyInsertedPositions)); } return; @@ -360,10 +360,10 @@ namespace Content.Server.Storage.EntitySystems // If the user's active hand is empty, try pick up the item. if (hands.ActiveHandEntity == null) - { + { if (_sharedHandsSystem.TryPickupAnyHand(player, args.InteractedItemUID, handsComp: hands) && storageComp.StorageRemoveSound != null) - SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), storageComp.StorageRemoveSound.GetSound(), uid, AudioParams.Default); + SoundSystem.Play(storageComp.StorageRemoveSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), uid, AudioParams.Default); return; } @@ -401,7 +401,7 @@ namespace Content.Server.Storage.EntitySystems UpdateStorageVisualization(uid, storageComp); if (storageComp.StorageCloseSound is not null) - SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), storageComp.StorageCloseSound.GetSound(), uid, storageComp.StorageCloseSound.Params); + SoundSystem.Play(storageComp.StorageCloseSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), uid, storageComp.StorageCloseSound.Params); } } @@ -513,7 +513,7 @@ namespace Content.Server.Storage.EntitySystems return false; if (storageComp.StorageInsertSound is not null) - SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), storageComp.StorageInsertSound.GetSound(), uid, AudioParams.Default); + SoundSystem.Play(storageComp.StorageInsertSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), uid, AudioParams.Default); RecalculateStorageUsed(storageComp); UpdateStorageUI(uid, storageComp); @@ -593,7 +593,7 @@ namespace Content.Server.Storage.EntitySystems return; if (storageComp.StorageOpenSound is not null) - SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), storageComp.StorageOpenSound.GetSound(), uid, storageComp.StorageOpenSound.Params); + SoundSystem.Play(storageComp.StorageOpenSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), uid, storageComp.StorageOpenSound.Params); Logger.DebugS(storageComp.LoggerName, $"Storage (UID {uid}) \"used\" by player session (UID {player.PlayerSession.AttachedEntity})."); diff --git a/Content.Server/Stunnable/StunSystem.cs b/Content.Server/Stunnable/StunSystem.cs index 5e2f1458c7..8701cdac8a 100644 --- a/Content.Server/Stunnable/StunSystem.cs +++ b/Content.Server/Stunnable/StunSystem.cs @@ -36,7 +36,7 @@ namespace Content.Server.Stunnable var target = args.Target; var knock = EntityManager.GetComponent(uid); - SoundSystem.Play(Filter.Pvs(source), knock.StunAttemptSound.GetSound(), source, AudioHelpers.WithVariation(0.025f)); + SoundSystem.Play(knock.StunAttemptSound.GetSound(), Filter.Pvs(source), source, AudioHelpers.WithVariation(0.025f)); // TODO: Use PopupSystem source.PopupMessageOtherClients(Loc.GetString("stunned-component-disarm-success-others", ("source", Name(source)), ("target", Name(target)))); diff --git a/Content.Server/Stunnable/StunbatonSystem.cs b/Content.Server/Stunnable/StunbatonSystem.cs index a868f1c7fd..016748c99e 100644 --- a/Content.Server/Stunnable/StunbatonSystem.cs +++ b/Content.Server/Stunnable/StunbatonSystem.cs @@ -99,7 +99,7 @@ namespace Content.Server.Stunnable // TODO: Make slowdown inflicted customizable. - SoundSystem.Play(Filter.Pvs(comp.Owner), comp.StunSound.GetSound(), comp.Owner, AudioHelpers.WithVariation(0.25f)); + SoundSystem.Play(comp.StunSound.GetSound(), Filter.Pvs(comp.Owner), comp.Owner, AudioHelpers.WithVariation(0.25f)); if (!EntityManager.HasComponent(entity)) { if (_robustRandom.Prob(comp.ParalyzeChanceNoSlowdown)) @@ -122,7 +122,7 @@ namespace Content.Server.Stunnable if (!TryComp(comp.Owner, out var battery) || !(battery.CurrentCharge < comp.EnergyPerUse)) return; - SoundSystem.Play(Filter.Pvs(comp.Owner), comp.SparksSound.GetSound(), comp.Owner, AudioHelpers.WithVariation(0.25f)); + SoundSystem.Play(comp.SparksSound.GetSound(), Filter.Pvs(comp.Owner), comp.Owner, AudioHelpers.WithVariation(0.25f)); TurnOff(comp); } @@ -136,7 +136,7 @@ namespace Content.Server.Stunnable if (!EntityManager.TryGetComponent(comp.Owner, out var sprite) || !EntityManager.TryGetComponent(comp.Owner, out var item)) return; - SoundSystem.Play(Filter.Pvs(comp.Owner), comp.SparksSound.GetSound(), comp.Owner, AudioHelpers.WithVariation(0.25f)); + SoundSystem.Play(comp.SparksSound.GetSound(), Filter.Pvs(comp.Owner), comp.Owner, AudioHelpers.WithVariation(0.25f)); item.EquippedPrefix = "off"; // TODO stunbaton visualizer sprite.LayerSetState(0, "stunbaton_off"); @@ -157,12 +157,12 @@ namespace Content.Server.Stunnable var playerFilter = Filter.Pvs(comp.Owner); if (!TryComp(comp.Owner, out var battery) || battery.CurrentCharge < comp.EnergyPerUse) { - SoundSystem.Play(playerFilter, comp.TurnOnFailSound.GetSound(), comp.Owner, AudioHelpers.WithVariation(0.25f)); + SoundSystem.Play(comp.TurnOnFailSound.GetSound(), playerFilter, comp.Owner, AudioHelpers.WithVariation(0.25f)); user.PopupMessage(Loc.GetString("stunbaton-component-low-charge")); return; } - SoundSystem.Play(playerFilter, comp.SparksSound.GetSound(), comp.Owner, AudioHelpers.WithVariation(0.25f)); + SoundSystem.Play(comp.SparksSound.GetSound(), playerFilter, comp.Owner, AudioHelpers.WithVariation(0.25f)); item.EquippedPrefix = "on"; sprite.LayerSetState(0, "stunbaton_on"); diff --git a/Content.Server/Tiles/FloorTileSystem.cs b/Content.Server/Tiles/FloorTileSystem.cs index e831f8d835..4e8f322b76 100644 --- a/Content.Server/Tiles/FloorTileSystem.cs +++ b/Content.Server/Tiles/FloorTileSystem.cs @@ -83,7 +83,7 @@ namespace Content.Server.Tiles { var variant = _random.Pick(((ContentTileDefinition) _tileDefinitionManager[tileId]).PlacementVariants); mapGrid.SetTile(location.Offset(new Vector2(offset, offset)), new Tile(tileId, 0, variant)); - SoundSystem.Play(Filter.Pvs(location), placeSound.GetSound(), location, AudioHelpers.WithVariation(0.125f, _random)); + SoundSystem.Play(placeSound.GetSound(), Filter.Pvs(location), location, AudioHelpers.WithVariation(0.125f, _random)); } } } diff --git a/Content.Server/Toilet/ToiletSystem.cs b/Content.Server/Toilet/ToiletSystem.cs index 5860bbc24b..bc0a600f30 100644 --- a/Content.Server/Toilet/ToiletSystem.cs +++ b/Content.Server/Toilet/ToiletSystem.cs @@ -177,8 +177,8 @@ namespace Content.Server.Toilet return; component.IsSeatUp = !component.IsSeatUp; - SoundSystem.Play(Filter.Pvs(uid), component.ToggleSound.GetSound(), uid, - AudioHelpers.WithVariation(0.05f)); + SoundSystem.Play(component.ToggleSound.GetSound(), Filter.Pvs(uid), + uid, AudioHelpers.WithVariation(0.05f)); UpdateSprite(uid, component); } diff --git a/Content.Server/Tools/ToolSystem.MultipleTool.cs b/Content.Server/Tools/ToolSystem.MultipleTool.cs index 1ae571093c..646f9250f2 100644 --- a/Content.Server/Tools/ToolSystem.MultipleTool.cs +++ b/Content.Server/Tools/ToolSystem.MultipleTool.cs @@ -53,7 +53,7 @@ namespace Content.Server.Tools var current = multiple.Entries[multiple.CurrentEntry]; if(current.ChangeSound is {} changeSound) - SoundSystem.Play(Filter.Pvs(uid), changeSound.GetSound(), uid); + SoundSystem.Play(changeSound.GetSound(), Filter.Pvs(uid), uid); return true; } diff --git a/Content.Server/Tools/ToolSystem.Welder.cs b/Content.Server/Tools/ToolSystem.Welder.cs index a7b37c07c4..69c387c017 100644 --- a/Content.Server/Tools/ToolSystem.Welder.cs +++ b/Content.Server/Tools/ToolSystem.Welder.cs @@ -111,7 +111,7 @@ namespace Content.Server.Tools if (light != null) light.Enabled = true; - SoundSystem.Play(Filter.Pvs(uid), welder.WelderOnSounds.GetSound(), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f)); + SoundSystem.Play(welder.WelderOnSounds.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f)); // TODO: Use TransformComponent directly. _atmosphereSystem.HotspotExpose(EntityManager.GetComponent(welder.Owner).Coordinates, 700, 50, true); @@ -146,7 +146,7 @@ namespace Content.Server.Tools if (light != null) light.Enabled = false; - SoundSystem.Play(Filter.Pvs(uid), welder.WelderOffSounds.GetSound(), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f)); + SoundSystem.Play(welder.WelderOffSounds.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f)); welder.Dirty(); @@ -217,7 +217,7 @@ namespace Content.Server.Tools { var drained = _solutionContainerSystem.Drain(target, targetSolution, trans); _solutionContainerSystem.TryAddSolution(uid, welderSolution, drained); - SoundSystem.Play(Filter.Pvs(uid), welder.WelderRefill.GetSound(), uid); + SoundSystem.Play(welder.WelderRefill.GetSound(), Filter.Pvs(uid), uid); target.PopupMessage(args.User, Loc.GetString("welder-component-after-interact-refueled-message")); } else diff --git a/Content.Server/Tools/ToolSystem.cs b/Content.Server/Tools/ToolSystem.cs index ccbd26a21c..7ea23d166a 100644 --- a/Content.Server/Tools/ToolSystem.cs +++ b/Content.Server/Tools/ToolSystem.cs @@ -244,8 +244,8 @@ namespace Content.Server.Tools return; // Pass tool.Owner to Filter.Pvs to avoid a TryGetEntity call. - SoundSystem.Play(Filter.Pvs(tool.Owner), sound.GetSound(), uid, - AudioHelpers.WithVariation(0.175f).WithVolume(-5f)); + SoundSystem.Play(sound.GetSound(), Filter.Pvs(tool.Owner), + uid, AudioHelpers.WithVariation(0.175f).WithVolume(-5f)); } public override void Update(float frameTime) diff --git a/Content.Server/Traitor/Uplink/UplinkSystem.cs b/Content.Server/Traitor/Uplink/UplinkSystem.cs index 30e1465e73..d863eb8d2e 100644 --- a/Content.Server/Traitor/Uplink/UplinkSystem.cs +++ b/Content.Server/Traitor/Uplink/UplinkSystem.cs @@ -112,16 +112,16 @@ namespace Content.Server.Traitor.Uplink if (!_accounts.TryPurchaseItem(uplink.UplinkAccount, message.ItemId, EntityManager.GetComponent(player).Coordinates, out var entity)) { - SoundSystem.Play(Filter.SinglePlayer(message.Session), uplink.InsufficientFundsSound.GetSound(), - uplink.Owner, AudioParams.Default); + SoundSystem.Play(uplink.InsufficientFundsSound.GetSound(), + Filter.SinglePlayer(message.Session), uplink.Owner, AudioParams.Default); RaiseNetworkEvent(new UplinkInsufficientFundsMessage(), message.Session.ConnectedClient); return; } _handsSystem.PickupOrDrop(player, entity.Value); - SoundSystem.Play(Filter.SinglePlayer(message.Session), uplink.BuySuccessSound.GetSound(), - uplink.Owner, AudioParams.Default.WithVolume(-8f)); + SoundSystem.Play(uplink.BuySuccessSound.GetSound(), + Filter.SinglePlayer(message.Session), uplink.Owner, AudioParams.Default.WithVolume(-8f)); RaiseNetworkEvent(new UplinkBuySuccessMessage(), message.Session.ConnectedClient); } @@ -143,8 +143,8 @@ namespace Content.Server.Traitor.Uplink _handsSystem.PickupOrDrop(player, tcUid.Value); // play buying sound - SoundSystem.Play(Filter.SinglePlayer(args.Session), uplink.BuySuccessSound.GetSound(), - uplink.Owner, AudioParams.Default.WithVolume(-8f)); + SoundSystem.Play(uplink.BuySuccessSound.GetSound(), + Filter.SinglePlayer(args.Session), uplink.Owner, AudioParams.Default.WithVolume(-8f)); UpdateUserInterface(uplink); } diff --git a/Content.Server/Vehicle/HonkSystem.cs b/Content.Server/Vehicle/HonkSystem.cs index ec9fb8afbe..f948f42869 100644 --- a/Content.Server/Vehicle/HonkSystem.cs +++ b/Content.Server/Vehicle/HonkSystem.cs @@ -28,7 +28,7 @@ namespace Content.Server.Vehicle return; if (vehicle.HornSound != null) { - SoundSystem.Play(Filter.Pvs(uid), vehicle.HornSound.GetSound(), uid, AudioHelpers.WithVariation(0.1f).WithVolume(8f)); + SoundSystem.Play(vehicle.HornSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.1f).WithVolume(8f)); args.Handled = true; } } @@ -47,7 +47,7 @@ namespace Content.Server.Vehicle vehicle.SirenPlayingStream?.Stop(); vehicle.LoopingHornIsPlaying = true; if (vehicle.HornSound != null) - vehicle.SirenPlayingStream = SoundSystem.Play(Filter.Pvs(uid), vehicle.HornSound.GetSound(), uid, AudioParams.Default.WithLoop(true).WithVolume(1.8f)); + vehicle.SirenPlayingStream = SoundSystem.Play(vehicle.HornSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithLoop(true).WithVolume(1.8f)); return; } vehicle.SirenPlayingStream?.Stop(); diff --git a/Content.Server/VendingMachines/VendingMachineSystem.cs b/Content.Server/VendingMachines/VendingMachineSystem.cs index 4ac0a432ed..a5d873182b 100644 --- a/Content.Server/VendingMachines/VendingMachineSystem.cs +++ b/Content.Server/VendingMachines/VendingMachineSystem.cs @@ -158,7 +158,7 @@ namespace Content.Server.VendingMachines if (!Resolve(uid, ref vendComponent)) return; - SoundSystem.Play(Filter.Pvs(vendComponent.Owner), vendComponent.SoundDeny.GetSound(), vendComponent.Owner, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(vendComponent.SoundDeny.GetSound(), Filter.Pvs(vendComponent.Owner), vendComponent.Owner, AudioParams.Default.WithVolume(-2f)); // Play the Deny animation TryUpdateVisualState(uid, VendingMachineVisualState.Deny, vendComponent); //TODO: This duration should be a distinct value specific to the deny animation @@ -240,7 +240,7 @@ namespace Content.Server.VendingMachines _throwingSystem.TryThrow(ent, direction, vendComponent.NonLimitedEjectForce); } }); - SoundSystem.Play(Filter.Pvs(vendComponent.Owner), vendComponent.SoundVend.GetSound(), vendComponent.Owner, AudioParams.Default.WithVolume(-2f)); + SoundSystem.Play(vendComponent.SoundVend.GetSound(), Filter.Pvs(vendComponent.Owner), vendComponent.Owner, AudioParams.Default.WithVolume(-2f)); } public void AuthorizedVend(EntityUid uid, EntityUid sender, InventoryType type, string itemId, VendingMachineComponent component) diff --git a/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs b/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs index c9a10e498f..ba165e8b49 100644 --- a/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs +++ b/Content.Server/Weapon/Melee/EnergySword/EnergySwordSystem.cs @@ -68,7 +68,7 @@ namespace Content.Server.Weapon.Melee.EnergySword item.Size = 5; } - SoundSystem.Play(Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.DeActivateSound.GetSound(), comp.Owner); + SoundSystem.Play(comp.DeActivateSound.GetSound(), Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner); comp.Activated = false; } @@ -83,7 +83,7 @@ namespace Content.Server.Weapon.Melee.EnergySword item.Size = 9999; } - SoundSystem.Play(Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.ActivateSound.GetSound(), comp.Owner); + SoundSystem.Play(comp.ActivateSound.GetSound(), Filter.Pvs(comp.Owner, entityManager: EntityManager), comp.Owner); comp.Activated = true; } diff --git a/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs b/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs index e6ec023ba8..7a67b48564 100644 --- a/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs +++ b/Content.Server/Weapon/Melee/MeleeWeaponSystem.cs @@ -112,7 +112,7 @@ namespace Content.Server.Weapon.Melee } else { - SoundSystem.Play(Filter.Pvs(owner, entityManager: EntityManager), comp.MissSound.GetSound(), args.User); + SoundSystem.Play(comp.MissSound.GetSound(), Filter.Pvs(owner, entityManager: EntityManager), args.User); return; } @@ -169,7 +169,7 @@ namespace Content.Server.Weapon.Melee } else { - SoundSystem.Play(Filter.Pvs(owner), comp.MissSound.GetSound(), Transform(args.User).Coordinates); + SoundSystem.Play(comp.MissSound.GetSound(), Filter.Pvs(owner), Transform(args.User).Coordinates); } foreach (var entity in hitEntities) @@ -227,17 +227,17 @@ namespace Content.Server.Weapon.Melee { if (type == null && damageSoundComp.NoDamageSound != null) { - SoundSystem.Play(Filter.Pvs(target, entityManager: EntityManager), damageSoundComp.NoDamageSound.GetSound(), target, AudioHelpers.WithVariation(DamagePitchVariation)); + SoundSystem.Play(damageSoundComp.NoDamageSound.GetSound(), Filter.Pvs(target, entityManager: EntityManager), target, AudioHelpers.WithVariation(DamagePitchVariation)); playedSound = true; } else if (type != null && damageSoundComp.SoundTypes?.TryGetValue(type, out var damageSoundType) == true) { - SoundSystem.Play(Filter.Pvs(target, entityManager: EntityManager), damageSoundType!.GetSound(), target, AudioHelpers.WithVariation(DamagePitchVariation)); + SoundSystem.Play(damageSoundType!.GetSound(), Filter.Pvs(target, entityManager: EntityManager), target, AudioHelpers.WithVariation(DamagePitchVariation)); playedSound = true; } else if (type != null && damageSoundComp.SoundGroups?.TryGetValue(type, out var damageSoundGroup) == true) { - SoundSystem.Play(Filter.Pvs(target, entityManager: EntityManager), damageSoundGroup!.GetSound(), target, AudioHelpers.WithVariation(DamagePitchVariation)); + SoundSystem.Play(damageSoundGroup!.GetSound(), Filter.Pvs(target, entityManager: EntityManager), target, AudioHelpers.WithVariation(DamagePitchVariation)); playedSound = true; } } @@ -247,12 +247,12 @@ namespace Content.Server.Weapon.Melee { if (hitSoundOverride != null) { - SoundSystem.Play(Filter.Pvs(target, entityManager: EntityManager), hitSoundOverride.GetSound(), target, AudioHelpers.WithVariation(DamagePitchVariation)); + SoundSystem.Play(hitSoundOverride.GetSound(), Filter.Pvs(target, entityManager: EntityManager), target, AudioHelpers.WithVariation(DamagePitchVariation)); playedSound = true; } else if (hitSound != null) { - SoundSystem.Play(Filter.Pvs(target, entityManager: EntityManager), hitSound.GetSound(), target); + SoundSystem.Play(hitSound.GetSound(), Filter.Pvs(target, entityManager: EntityManager), target); playedSound = true; } } @@ -266,14 +266,14 @@ namespace Content.Server.Weapon.Melee case "Burn": case "Heat": case "Cold": - SoundSystem.Play(Filter.Pvs(target, entityManager: EntityManager), "/Audio/Items/welder.ogg", target); + SoundSystem.Play("/Audio/Items/welder.ogg", Filter.Pvs(target, entityManager: EntityManager), target); break; // No damage, fallback to tappies case null: - SoundSystem.Play(Filter.Pvs(target, entityManager: EntityManager), "/Audio/Weapons/tap.ogg", target); + SoundSystem.Play("/Audio/Weapons/tap.ogg", Filter.Pvs(target, entityManager: EntityManager), target); break; case "Brute": - SoundSystem.Play(Filter.Pvs(target, entityManager: EntityManager), "/Audio/Weapons/smash.ogg", target); + SoundSystem.Play("/Audio/Weapons/smash.ogg", Filter.Pvs(target, entityManager: EntityManager), target); break; } } diff --git a/Content.Server/Weapon/Ranged/Systems/GunSystem.cs b/Content.Server/Weapon/Ranged/Systems/GunSystem.cs index 74c27641b0..0e9f2efe6e 100644 --- a/Content.Server/Weapon/Ranged/Systems/GunSystem.cs +++ b/Content.Server/Weapon/Ranged/Systems/GunSystem.cs @@ -207,7 +207,7 @@ public sealed partial class GunSystem : SharedGunSystem { if (string.IsNullOrEmpty(sound)) return; - SoundSystem.Play(Filter.Pvs(gun, entityManager: EntityManager).RemoveWhereAttachedEntity(e => e == user), sound, gun); + SoundSystem.Play(sound, Filter.Pvs(gun, entityManager: EntityManager).RemoveWhereAttachedEntity(e => e == user), gun); } protected override void Popup(string message, EntityUid? uid, EntityUid? user) {} @@ -239,28 +239,24 @@ public sealed partial class GunSystem : SharedGunSystem if (type != null && rangedSound.SoundTypes?.TryGetValue(type, out var damageSoundType) == true) { - SoundSystem.Play( + SoundSystem.Play(damageSoundType!.GetSound(), Filter.Pvs(otherEntity, entityManager: EntityManager), - damageSoundType!.GetSound(), - otherEntity, - AudioHelpers.WithVariation(DamagePitchVariation)); + otherEntity, AudioHelpers.WithVariation(DamagePitchVariation)); playedSound = true; } else if (type != null && rangedSound.SoundGroups?.TryGetValue(type, out var damageSoundGroup) == true) { - SoundSystem.Play( + SoundSystem.Play(damageSoundGroup!.GetSound(), Filter.Pvs(otherEntity, entityManager: EntityManager), - damageSoundGroup!.GetSound(), - otherEntity, - AudioHelpers.WithVariation(DamagePitchVariation)); + otherEntity, AudioHelpers.WithVariation(DamagePitchVariation)); playedSound = true; } } if (!playedSound && weaponSound != null) - SoundSystem.Play(Filter.Pvs(otherEntity, entityManager: EntityManager), weaponSound.GetSound(), otherEntity); + SoundSystem.Play(weaponSound.GetSound(), Filter.Pvs(otherEntity, entityManager: EntityManager), otherEntity); } // TODO: Pseudo RNG so the client can predict these. diff --git a/Content.Server/Wieldable/WieldableSystem.cs b/Content.Server/Wieldable/WieldableSystem.cs index fc9cfd0b95..f2d6ea5aa7 100644 --- a/Content.Server/Wieldable/WieldableSystem.cs +++ b/Content.Server/Wieldable/WieldableSystem.cs @@ -177,7 +177,7 @@ namespace Content.Server.Wieldable if (component.WieldSound != null) { - SoundSystem.Play(Filter.Pvs(uid), component.WieldSound.GetSound()); + SoundSystem.Play(component.WieldSound.GetSound(), Filter.Pvs(uid)); } for (var i = 0; i < component.FreeHandsRequired; i++) @@ -207,8 +207,7 @@ namespace Content.Server.Wieldable { if (component.UnwieldSound != null) { - SoundSystem.Play(Filter.Pvs(uid), - component.UnwieldSound.GetSound()); + SoundSystem.Play(component.UnwieldSound.GetSound(), Filter.Pvs(uid)); } args.User.Value.PopupMessage(Loc.GetString("wieldable-component-failed-wield", diff --git a/Content.Server/Wires/WiresSystem.cs b/Content.Server/Wires/WiresSystem.cs index a0e0037323..eec868491f 100644 --- a/Content.Server/Wires/WiresSystem.cs +++ b/Content.Server/Wires/WiresSystem.cs @@ -468,11 +468,11 @@ public sealed class WiresSystem : EntitySystem if (component.IsPanelOpen) { - SoundSystem.Play(Filter.Pvs(args.Target), component.ScrewdriverOpenSound.GetSound(), args.Target); + SoundSystem.Play(component.ScrewdriverOpenSound.GetSound(), Filter.Pvs(args.Target), args.Target); } else { - SoundSystem.Play(Filter.Pvs(args.Target), component.ScrewdriverCloseSound.GetSound(), args.Target); + SoundSystem.Play(component.ScrewdriverCloseSound.GetSound(), Filter.Pvs(args.Target), args.Target); _uiSystem.GetUiOrNull(args.Target, WiresUiKey.Key)?.CloseAll(); } } @@ -742,7 +742,7 @@ public sealed class WiresSystem : EntitySystem wire.Action.Pulse(user, wire); UpdateUserInterface(used); - SoundSystem.Play(Filter.Pvs(used), wires.PulseSound.GetSound(), used); + SoundSystem.Play(wires.PulseSound.GetSound(), Filter.Pvs(used), used); break; } diff --git a/Content.Shared/Actions/SharedActionsSystem.cs b/Content.Shared/Actions/SharedActionsSystem.cs index b99c36d504..2050a5a38c 100644 --- a/Content.Shared/Actions/SharedActionsSystem.cs +++ b/Content.Shared/Actions/SharedActionsSystem.cs @@ -333,7 +333,7 @@ public abstract class SharedActionsSystem : EntitySystem var filter = Filter.Pvs(performer).RemoveWhereAttachedEntity(e => e == performer); if (action.Sound != null) - SoundSystem.Play(filter, action.Sound.GetSound(), performer, action.AudioParams); + SoundSystem.Play(action.Sound.GetSound(), filter, performer, action.AudioParams); if (string.IsNullOrWhiteSpace(action.Popup)) return true; diff --git a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs index cc331207f7..49ef5d2658 100644 --- a/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs +++ b/Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs @@ -225,7 +225,7 @@ namespace Content.Shared.Containers.ItemSlots if (excluded != null) filter = filter.RemoveWhereAttachedEntity(entity => entity == excluded.Value); - SoundSystem.Play(filter, sound.GetSound(), uid, audioParams); + SoundSystem.Play(sound.GetSound(), filter, uid, audioParams); } /// diff --git a/Content.Shared/Inventory/InventorySystem.Equip.cs b/Content.Shared/Inventory/InventorySystem.Equip.cs index ce58779e63..721d14956e 100644 --- a/Content.Shared/Inventory/InventorySystem.Equip.cs +++ b/Content.Shared/Inventory/InventorySystem.Equip.cs @@ -207,7 +207,7 @@ public abstract partial class InventorySystem filter.RemoveWhereAttachedEntity(entity => entity == actor); } - SoundSystem.Play(filter, item.EquipSound.GetSound(), target, item.EquipSound.Params.WithVolume(-2f)); + SoundSystem.Play(item.EquipSound.GetSound(), filter, target, item.EquipSound.Params.WithVolume(-2f)); } inventory.Dirty(); @@ -386,7 +386,7 @@ public abstract partial class InventorySystem filter.RemoveWhereAttachedEntity(entity => entity == actor); } - SoundSystem.Play(filter, item.UnequipSound.GetSound(), target, item.UnequipSound.Params.WithVolume(-2f)); + SoundSystem.Play(item.UnequipSound.GetSound(), filter, target, item.UnequipSound.Params.WithVolume(-2f)); } inventory.Dirty(); diff --git a/Content.Shared/Movement/SharedMoverController.cs b/Content.Shared/Movement/SharedMoverController.cs index 0dbadd5d95..9c5cd383eb 100644 --- a/Content.Shared/Movement/SharedMoverController.cs +++ b/Content.Shared/Movement/SharedMoverController.cs @@ -166,11 +166,9 @@ namespace Content.Shared.Movement if (TryGetSound(mover, mobMover, xform, out var variation, out var sound)) { - SoundSystem.Play( + SoundSystem.Play(sound, GetSoundPlayers(mover.Owner), - sound, - mover.Owner, - AudioHelpers.WithVariation(variation).WithVolume(FootstepVolume)); + mover.Owner, AudioHelpers.WithVariation(variation).WithVolume(FootstepVolume)); } } diff --git a/Content.Shared/Standing/StandingStateSystem.cs b/Content.Shared/Standing/StandingStateSystem.cs index 90306f6cc6..ed8a01d04a 100644 --- a/Content.Shared/Standing/StandingStateSystem.cs +++ b/Content.Shared/Standing/StandingStateSystem.cs @@ -101,7 +101,7 @@ namespace Content.Shared.Standing // > no longer true with door crushing. There just needs to be a better way to handle audio prediction. if (playSound) { - SoundSystem.Play(Filter.Pvs(uid), standingState.DownSound.GetSound(), uid, AudioHelpers.WithVariation(0.25f)); + SoundSystem.Play(standingState.DownSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.25f)); } return true; diff --git a/Content.Shared/Stunnable/SharedStunSystem.cs b/Content.Shared/Stunnable/SharedStunSystem.cs index 9143dab672..e0c0c5bca4 100644 --- a/Content.Shared/Stunnable/SharedStunSystem.cs +++ b/Content.Shared/Stunnable/SharedStunSystem.cs @@ -200,7 +200,7 @@ namespace Content.Shared.Stunnable _statusEffectSystem.TryRemoveTime(uid, "KnockedDown", TimeSpan.FromSeconds(knocked.HelpInterval)); - SoundSystem.Play(Filter.Pvs(uid), knocked.StunAttemptSound.GetSound(), uid, AudioHelpers.WithVariation(0.05f)); + SoundSystem.Play(knocked.StunAttemptSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.05f)); knocked.Dirty(); diff --git a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs index dc8008c507..e90671fd1c 100644 --- a/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs +++ b/Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs @@ -327,7 +327,7 @@ public abstract partial class SharedGunSystem : EntitySystem } if (sound != null && playSound) - SoundSystem.Play(Filter.Pvs(entity, entityManager: EntityManager), sound, coordinates, AudioHelpers.WithVariation(0.05f).WithVolume(-1f)); + SoundSystem.Play(sound, Filter.Pvs(entity, entityManager: EntityManager), coordinates, AudioHelpers.WithVariation(0.05f).WithVolume(-1f)); } protected void MuzzleFlash(EntityUid gun, AmmoComponent component, EntityUid? user = null)