]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Revert "Update submodule to 175.0.0 (#21318)" (#21319)
authormetalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
Sun, 29 Oct 2023 04:29:30 +0000 (15:29 +1100)
committerGitHub <noreply@github.com>
Sun, 29 Oct 2023 04:29:30 +0000 (15:29 +1100)
327 files changed:
Content.Client/Access/AccessOverlay.cs
Content.Client/Access/Commands/ShowAccessReadersCommand.cs
Content.Client/Administration/AdminNameOverlay.cs
Content.Client/Administration/Systems/AdminSystem.Overlay.cs
Content.Client/Administration/UI/SpawnExplosion/ExplosionDebugOverlay.cs
Content.Client/Arcade/BlockGameMenu.cs
Content.Client/Atmos/EntitySystems/GasTileOverlaySystem.cs
Content.Client/Atmos/Overlays/GasTileOverlay.cs
Content.Client/Audio/AmbientSoundSystem.cs
Content.Client/Audio/BackgroundAudioSystem.cs
Content.Client/Audio/ClientGlobalSoundSystem.cs
Content.Client/Audio/ContentAudioSystem.AmbientMusic.cs
Content.Client/Audio/ContentAudioSystem.cs
Content.Client/Changelog/ChangelogTab.xaml.cs
Content.Client/Clickable/ClickMapManager.cs
Content.Client/Clothing/ClientClothingSystem.cs
Content.Client/Credits/CreditsWindow.xaml.cs
Content.Client/Decals/UI/PaletteColorPicker.xaml.cs
Content.Client/Disposal/Systems/DisposalUnitSystem.cs
Content.Client/Doors/DoorSystem.cs
Content.Client/Explosion/ExplosionOverlaySystem.cs
Content.Client/Fax/AdminUI/AdminFaxWindow.xaml.cs
Content.Client/Fluids/PuddleOverlay.cs
Content.Client/GameTicking/Managers/ClientGameTicker.cs
Content.Client/Gravity/GravitySystem.Shake.cs
Content.Client/Guidebook/GuidebookSystem.cs
Content.Client/Info/RulesAndInfoWindow.cs
Content.Client/IoC/StaticIoC.cs
Content.Client/Items/Systems/ItemSystem.cs
Content.Client/Light/Components/ExpendableLightComponent.cs
Content.Client/Light/EntitySystems/ExpendableLightSystem.cs
Content.Client/Light/Visualizers/PoweredLightVisualizerSystem.cs
Content.Client/Lobby/LobbyState.cs
Content.Client/MainMenu/MainMenu.cs
Content.Client/MainMenu/UI/MainMenuControl.xaml.cs
Content.Client/NPC/HTN/HTNOverlay.cs
Content.Client/NPC/HTN/HTNSystem.cs
Content.Client/NPC/PathfindingSystem.cs
Content.Client/NodeContainer/NodeGroupSystem.cs
Content.Client/NodeContainer/NodeVisualizationOverlay.cs
Content.Client/Options/UI/Tabs/AudioTab.xaml.cs
Content.Client/Paper/UI/PaperWindow.xaml.cs
Content.Client/Paper/UI/StampWidget.xaml.cs
Content.Client/Parallax/Data/GeneratedParallaxTextureSource.cs
Content.Client/ParticleAccelerator/UI/ParticleAcceleratorControlMenu.cs
Content.Client/Pinpointer/UI/NavMapControl.cs
Content.Client/Popups/PopupOverlay.cs
Content.Client/Popups/PopupSystem.cs
Content.Client/Preferences/UI/CharacterSetupGui.xaml.cs
Content.Client/Radiation/Overlays/RadiationDebugOverlay.cs
Content.Client/Replay/ContentReplayPlaybackManager.cs
Content.Client/Replay/UI/Loading/LoadingScreen.cs
Content.Client/Replay/UI/Loading/LoadingScreenControl.xaml.cs
Content.Client/Resources/ResourceCacheExtensions.cs
Content.Client/SprayPainter/SprayPainterSystem.cs
Content.Client/Stylesheets/StyleBase.cs
Content.Client/Stylesheets/StyleNano.cs
Content.Client/Stylesheets/StyleSpace.cs
Content.Client/Stylesheets/StylesheetManager.cs
Content.Client/SurveillanceCamera/UI/SurveillanceCameraMonitorWindow.xaml.cs
Content.Client/Traits/ParacusiaSystem.cs
Content.Client/Trigger/TimerTriggerVisualizerSystem.cs
Content.Client/UserInterface/Controls/FancyTree/FancyTree.xaml.cs
Content.Client/UserInterface/Systems/Atmos/GasTank/GasTankWindow.cs
Content.Client/UserInterface/Systems/Bwoink/AHelpUIController.cs
Content.Client/UserInterface/Systems/Chat/Controls/ChannelFilterButton.cs
Content.Client/UserInterface/Systems/Chat/Widgets/ChatBox.xaml.cs
Content.Client/UserInterface/XamlExtensions/TextureExtension.cs
Content.Client/Voting/VoteManager.cs
Content.Client/Weapons/Ranged/Systems/FlyBySoundSystem.cs
Content.Client/Weather/WeatherOverlay.cs
Content.Client/Weather/WeatherSystem.cs
Content.Client/Wires/UI/WiresMenu.cs
Content.IntegrationTests/Tests/Destructible/DestructibleThresholdActivationTest.cs
Content.IntegrationTests/Tests/DummyIconTest.cs
Content.IntegrationTests/Tests/Interaction/InteractionTest.Helpers.cs
Content.MapRenderer/Painters/DecalPainter.cs
Content.MapRenderer/Painters/EntityPainter.cs
Content.MapRenderer/Painters/TilePainter.cs
Content.Replay/Menu/ReplayMainMenu.cs
Content.Replay/Menu/ReplayMainMenuControl.xaml.cs
Content.Server/Access/Systems/AccessOverriderSystem.cs
Content.Server/Administration/Systems/AdminSystem.cs
Content.Server/AlertLevel/AlertLevelSystem.cs
Content.Server/Ame/EntitySystems/AmeControllerSystem.cs
Content.Server/Ame/EntitySystems/AmePartSystem.cs
Content.Server/Animals/Systems/EggLayerSystem.cs
Content.Server/Anomaly/AnomalySystem.Generator.cs
Content.Server/Anomaly/AnomalySystem.cs
Content.Server/Anomaly/Components/GeneratingAnomalyGeneratorComponent.cs
Content.Server/Anomaly/Effects/BluespaceAnomalySystem.cs
Content.Server/Anomaly/Effects/ReagentProducerAnomalySystem.cs
Content.Server/Antag/AntagSelectionSystem.cs
Content.Server/Arcade/SpaceVillainGame/SpaceVillainArcadeSystem.cs
Content.Server/Arcade/SpaceVillainGame/SpaceVillainGame.cs
Content.Server/Atmos/Components/GasTankComponent.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.HighPressureDelta.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.Hotspot.cs
Content.Server/Atmos/EntitySystems/AtmosphereSystem.cs
Content.Server/Atmos/EntitySystems/GasTankSystem.cs
Content.Server/Atmos/Monitor/Systems/AtmosAlarmableSystem.cs
Content.Server/Atmos/Piping/Binary/EntitySystems/GasValveSystem.cs
Content.Server/Atmos/Piping/Unary/EntitySystems/GasCanisterSystem.cs
Content.Server/Audio/ContentAudioSystem.cs
Content.Server/Beam/BeamSystem.cs
Content.Server/Bed/Sleep/SleepingSystem.cs
Content.Server/Bible/BibleSystem.cs
Content.Server/Body/Systems/BloodstreamSystem.cs
Content.Server/Body/Systems/BodySystem.cs
Content.Server/Botany/Systems/PlantHolderSystem.cs
Content.Server/CardboardBox/CardboardBoxSystem.cs
Content.Server/Cargo/Systems/CargoSystem.cs
Content.Server/CartridgeLoader/Cartridges/NetProbeCartridgeSystem.cs
Content.Server/Chat/Systems/ChatSystem.cs
Content.Server/Chemistry/EntitySystems/ChemMasterSystem.cs
Content.Server/Chemistry/EntitySystems/ChemistrySystem.cs
Content.Server/Chemistry/EntitySystems/ReagentDispenserSystem.cs
Content.Server/Chemistry/ReactionEffects/AreaReactionEffect.cs
Content.Server/Cloning/CloningSystem.cs
Content.Server/Cluwne/CluwneSystem.cs
Content.Server/Construction/Completions/PlaySound.cs
Content.Server/Construction/Components/PartExchangerComponent.cs
Content.Server/Construction/PartExchangerSystem.cs
Content.Server/Crayon/CrayonSystem.cs
Content.Server/Damage/Systems/DamageOnHighSpeedImpactSystem.cs
Content.Server/Defusable/Systems/DefusableSystem.cs
Content.Server/Destructible/DestructibleSystem.cs
Content.Server/Destructible/Thresholds/Behaviors/PlaySoundBehavior.cs
Content.Server/DeviceLinking/Systems/DeviceLinkOverloadSystem.cs
Content.Server/DeviceLinking/Systems/LogicGateSystem.cs
Content.Server/DeviceLinking/Systems/SignalSwitchSystem.cs
Content.Server/DeviceLinking/Systems/SignalTimerSystem.cs
Content.Server/DeviceNetwork/Systems/NetworkConfiguratorSystem.cs
Content.Server/Dice/DiceSystem.cs
Content.Server/Disposal/Tube/DisposalTubeSystem.cs
Content.Server/Dragon/DragonRiftSystem.cs
Content.Server/Dragon/DragonSystem.cs
Content.Server/Electrocution/ElectrocutionSystem.cs
Content.Server/Explosion/EntitySystems/ExplosionSystem.Visuals.cs
Content.Server/Explosion/EntitySystems/ExplosionSystem.cs
Content.Server/Explosion/EntitySystems/TriggerSystem.cs
Content.Server/Extinguisher/FireExtinguisherSystem.cs
Content.Server/Fax/FaxSystem.cs
Content.Server/Flash/FlashSystem.cs
Content.Server/Fluids/EntitySystems/AbsorbentSystem.cs
Content.Server/Fluids/EntitySystems/DrainSystem.cs
Content.Server/Fluids/EntitySystems/PuddleSystem.cs
Content.Server/Fluids/EntitySystems/SpraySystem.cs
Content.Server/Forensics/Systems/ForensicScannerSystem.cs
Content.Server/GameTicking/GameTicker.Player.cs
Content.Server/GameTicking/GameTicker.RoundFlow.cs
Content.Server/GameTicking/GameTicker.cs
Content.Server/GameTicking/Rules/NukeopsRuleSystem.cs
Content.Server/GameTicking/Rules/PiratesRuleSystem.cs
Content.Server/GameTicking/Rules/TraitorRuleSystem.cs
Content.Server/GameTicking/Rules/ZombieRuleSystem.cs
Content.Server/Gateway/Systems/GatewaySystem.cs
Content.Server/Gatherable/GatherableSystem.cs
Content.Server/Glue/GlueSystem.cs
Content.Server/Guardian/GuardianSystem.cs
Content.Server/Holiday/Christmas/RandomGiftSystem.cs
Content.Server/IgnitionSource/IgniteOnTriggerSystem.cs
Content.Server/ImmovableRod/ImmovableRodSystem.cs
Content.Server/Interaction/InteractionPopupSystem.cs
Content.Server/Item/ItemToggleSystem.cs
Content.Server/Kitchen/Components/MicrowaveComponent.cs
Content.Server/Kitchen/Components/ReagentGrinderComponent.cs
Content.Server/Kitchen/EntitySystems/KitchenSpikeSystem.cs
Content.Server/Kitchen/EntitySystems/MicrowaveSystem.cs
Content.Server/Kitchen/EntitySystems/ReagentGrinderSystem.cs
Content.Server/Lathe/LatheSystem.cs
Content.Server/Light/EntitySystems/ExpendableLightSystem.cs
Content.Server/Light/EntitySystems/HandheldLightSystem.cs
Content.Server/Light/EntitySystems/LightBulbSystem.cs
Content.Server/Light/EntitySystems/LightReplacerSystem.cs
Content.Server/Light/EntitySystems/MatchstickSystem.cs
Content.Server/Light/EntitySystems/PoweredLightSystem.cs
Content.Server/Light/EntitySystems/UnpoweredFlashlightSystem.cs
Content.Server/Lube/LubeSystem.cs
Content.Server/Magic/MagicSystem.cs
Content.Server/MassMedia/Systems/NewsSystem.cs
Content.Server/Materials/MaterialStorageSystem.cs
Content.Server/Mech/Equipment/Components/MechGrabberComponent.cs
Content.Server/Mech/Equipment/EntitySystems/MechGrabberSystem.cs
Content.Server/Medical/BiomassReclaimer/BiomassReclaimerSystem.cs
Content.Server/Medical/DefibrillatorSystem.cs
Content.Server/Medical/HealingSystem.cs
Content.Server/Medical/HealthAnalyzerSystem.cs
Content.Server/Medical/VomitSystem.cs
Content.Server/Mind/MindSystem.cs
Content.Server/Morgue/CrematoriumSystem.cs
Content.Server/Morgue/MorgueSystem.cs
Content.Server/NPC/HTN/PrimitiveTasks/Operators/Specific/MedibotInjectOperator.cs
Content.Server/NPC/Systems/NPCCombatSystem.cs
Content.Server/Ninja/Systems/BatteryDrainerSystem.cs
Content.Server/Ninja/Systems/SpaceNinjaSystem.cs
Content.Server/Ninja/Systems/StunProviderSystem.cs
Content.Server/Nuke/NukeComponent.cs
Content.Server/Nuke/NukeSystem.cs
Content.Server/Nutrition/Components/FatExtractorComponent.cs
Content.Server/Nutrition/EntitySystems/AnimalHusbandrySystem.cs
Content.Server/Nutrition/EntitySystems/CreamPieSystem.cs
Content.Server/Nutrition/EntitySystems/DrinkSystem.cs
Content.Server/Nutrition/EntitySystems/FatExtractorSystem.cs
Content.Server/Nutrition/EntitySystems/FoodSystem.cs
Content.Server/Nutrition/EntitySystems/OpenableSystem.cs
Content.Server/Nutrition/EntitySystems/SliceableFoodSystem.cs
Content.Server/Nutrition/EntitySystems/UtensilSystem.cs
Content.Server/PDA/Ringer/RingerSystem.cs
Content.Server/Paper/PaperSystem.cs
Content.Server/Pinpointer/ProximityBeeperSystem.cs
Content.Server/Plants/Systems/PottedPlantHideSystem.cs
Content.Server/Points/PointSystem.cs
Content.Server/Polymorph/Systems/PolymorphSystem.cs
Content.Server/Power/EntitySystems/ApcSystem.cs
Content.Server/Power/EntitySystems/PowerReceiverSystem.cs
Content.Server/Power/Generator/PortableGeneratorSystem.cs
Content.Server/Power/Generator/PowerSwitchableSystem.cs
Content.Server/PowerSink/PowerSinkSystem.cs
Content.Server/Radiation/Systems/GeigerSystem.cs
Content.Server/Research/TechnologyDisk/Systems/DiskConsoleSystem.cs
Content.Server/RoundEnd/RoundEndSystem.cs
Content.Server/Salvage/Expeditions/SalvageExpeditionComponent.cs
Content.Server/Salvage/SalvageSystem.Expeditions.cs
Content.Server/Salvage/SalvageSystem.Runner.cs
Content.Server/Salvage/SalvageSystem.cs
Content.Server/Shuttles/Components/FTLComponent.cs
Content.Server/Shuttles/Systems/EmergencyShuttleSystem.cs
Content.Server/Shuttles/Systems/ShuttleSystem.FasterThanLight.cs
Content.Server/Shuttles/Systems/ShuttleSystem.Impact.cs
Content.Server/Shuttles/Systems/ShuttleSystem.cs
Content.Server/Singularity/EntitySystems/SingularitySystem.cs
Content.Server/Speech/EntitySystems/VocalSystem.cs
Content.Server/Speech/SpeechNoiseSystem.cs
Content.Server/SprayPainter/SprayPainterSystem.cs
Content.Server/StationEvents/Events/StationEventSystem.cs
Content.Server/Storage/EntitySystems/CursedEntityStorageSystem.cs
Content.Server/Storage/EntitySystems/SpawnItemsOnUseSystem.cs
Content.Server/Storage/EntitySystems/StorageSystem.cs
Content.Server/Store/Systems/StoreSystem.Ui.cs
Content.Server/Stunnable/Systems/StunbatonSystem.cs
Content.Server/SurveillanceCamera/Systems/SurveillanceCameraSpeakerSystem.cs
Content.Server/Teleportation/HandTeleporterSystem.cs
Content.Server/Toilet/ToiletSystem.cs
Content.Server/Tools/ToolSystem.cs
Content.Server/Weapons/Melee/Balloon/BalloonPopperSystem.cs
Content.Server/Weapons/Melee/EnergySword/EnergySwordSystem.cs
Content.Server/Weapons/Melee/WeaponRandom/WeaponRandomSystem.cs
Content.Server/Wires/WiresSystem.cs
Content.Server/Xenoarchaeology/Equipment/Systems/ArtifactAnalyzerSystem.cs
Content.Server/Xenoarchaeology/XenoArtifacts/ArtifactSystem.cs
Content.Server/Xenoarchaeology/XenoArtifacts/Effects/Systems/PolyArtifactSystem.cs
Content.Server/Zombies/ZombieSystem.Transform.cs
Content.Shared/Actions/SharedActionsSystem.cs
Content.Shared/Anomaly/SharedAnomalySystem.cs
Content.Shared/Audio/SharedAmbientSoundSystem.cs
Content.Shared/Audio/SharedContentAudioSystem.cs
Content.Shared/Blocking/BlockingSystem.User.cs
Content.Shared/Blocking/Components/BlockingComponent.cs
Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs
Content.Shared/Buckle/SharedBuckleSystem.cs
Content.Shared/CCVar/CCVars.cs
Content.Shared/Cabinet/SharedItemCabinetSystem.cs
Content.Shared/Chasm/ChasmSystem.cs
Content.Shared/Chemistry/Reaction/ChemicalReactionSystem.cs
Content.Shared/Climbing/Systems/BonkSystem.cs
Content.Shared/Climbing/Systems/ClimbSystem.cs
Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs
Content.Shared/Cuffs/SharedCuffableSystem.cs
Content.Shared/Damage/Systems/StaminaSystem.cs
Content.Shared/Devour/SharedDevourSystem.cs
Content.Shared/Doors/Systems/SharedDoorBoltSystem.cs
Content.Shared/Doors/Systems/SharedDoorSystem.cs
Content.Shared/Inventory/InventorySystem.Equip.cs
Content.Shared/Light/SharedHandheldLightSystem.cs
Content.Shared/Lock/LockComponent.cs
Content.Shared/Lock/LockSystem.cs
Content.Shared/Materials/MaterialReclaimerComponent.cs
Content.Shared/Materials/SharedMaterialReclaimerSystem.cs
Content.Shared/Mech/Equipment/Systems/MechSoundboardSystem.cs
Content.Shared/Movement/Systems/SharedMoverController.cs
Content.Shared/Ninja/Systems/DashAbilitySystem.cs
Content.Shared/Ninja/Systems/SharedNinjaSuitSystem.cs
Content.Shared/Projectiles/SharedProjectileSystem.cs
Content.Shared/Prying/Systems/PryingSystem.cs
Content.Shared/RCD/Systems/RCDSystem.cs
Content.Shared/Radiation/Components/GeigerComponent.cs
Content.Shared/Radio/EntitySystems/EncryptionKeySystem.cs
Content.Shared/RatKing/SharedRatKingSystem.cs
Content.Shared/Salvage/Fulton/SharedFultonSystem.cs
Content.Shared/Silicons/Bots/EmaggableMedibotComponent.cs
Content.Shared/Silicons/Bots/MedibotSystem.cs
Content.Shared/Singularity/Components/SingularityComponent.cs
Content.Shared/Slippery/SlipperySystem.cs
Content.Shared/Sound/SharedEmitSoundSystem.cs
Content.Shared/Standing/StandingStateSystem.cs
Content.Shared/Storage/EntitySystems/DumpableSystem.cs
Content.Shared/Storage/EntitySystems/SharedEntityStorageSystem.cs
Content.Shared/Storage/EntitySystems/SharedStorageSystem.cs
Content.Shared/Stunnable/SharedStunSystem.cs
Content.Shared/Teleportation/Systems/SharedPortalSystem.cs
Content.Shared/Tiles/FloorTileComponent.cs
Content.Shared/Tiles/FloorTileSystem.cs
Content.Shared/Tools/Systems/SharedToolSystem.cs
Content.Shared/Traits/Assorted/ParacusiaComponent.cs
Content.Shared/Vehicle/Components/VehicleComponent.cs
Content.Shared/Vehicle/SharedVehicleSystem.cs
Content.Shared/VendingMachines/SharedVendingMachineSystem.cs
Content.Shared/Weapons/Marker/SharedDamageMarkerSystem.cs
Content.Shared/Weapons/Melee/SharedMeleeWeaponSystem.cs
Content.Shared/Weapons/Misc/BaseForceGunComponent.cs
Content.Shared/Weapons/Misc/SharedGrapplingGunSystem.cs
Content.Shared/Weapons/Misc/SharedTetherGunSystem.cs
Content.Shared/Weapons/Ranged/Components/GrapplingGunComponent.cs
Content.Shared/Weapons/Ranged/Systems/RechargeBasicEntityAmmoSystem.cs
Content.Shared/Weapons/Ranged/Systems/SharedGunSystem.cs
Content.Shared/Weapons/Reflect/SharedReflectSystem.cs
Content.Shared/Weather/SharedWeatherSystem.cs
Content.Shared/Weather/WeatherComponent.cs
Content.Shared/Wieldable/WieldableSystem.cs
Resources/Prototypes/Entities/Objects/Fun/toys.yml
Resources/Prototypes/Entities/Objects/Misc/paper.yml
Resources/Prototypes/Entities/Objects/Specific/Research/anomaly.yml
Resources/Prototypes/Entities/Structures/Machines/fatextractor.yml
Resources/Prototypes/Entities/Structures/Machines/material_reclaimer.yml
Resources/Prototypes/Voice/speech_emote_sounds.yml
RobustToolbox

index 90b872b4a40f8d3ea2a6c79b4ec50c9cefbe89be..2be3d07e90d50de224eefae304c7529961f967a5 100644 (file)
@@ -16,7 +16,7 @@ public sealed class AccessOverlay : Overlay
 
     public override OverlaySpace Space => OverlaySpace.ScreenSpace;
 
-    public AccessOverlay(IEntityManager entManager, IClientResourceCache cache, EntityLookupSystem lookup, SharedTransformSystem xform)
+    public AccessOverlay(IEntityManager entManager, IResourceCache cache, EntityLookupSystem lookup, SharedTransformSystem xform)
     {
         _entityManager = entManager;
         _lookup = lookup;
index 91a94138c836d461391ad5108125e7abe7ee7320..7c804dd969801bc9efb38b1d1dd7276fbcf2ba8f 100644 (file)
@@ -25,7 +25,7 @@ public sealed class ShowAccessReadersCommand : IConsoleCommand
         }
 
         var entManager = collection.Resolve<IEntityManager>();
-        var cache = collection.Resolve<IClientResourceCache>();
+        var cache = collection.Resolve<IResourceCache>();
         var lookup = entManager.System<EntityLookupSystem>();
         var xform = entManager.System<SharedTransformSystem>();
 
index fca50e1d95d79a7ff5cd558877141f55275635a6..c21ba2e32cadc6f5718ad1780d4d47518fe7edc1 100644 (file)
@@ -17,7 +17,7 @@ namespace Content.Client.Administration
         private readonly EntityLookupSystem _entityLookup;
         private readonly Font _font;
 
-        public AdminNameOverlay(AdminSystem system, IEntityManager entityManager, IEyeManager eyeManager, IClientResourceCache resourceCache, EntityLookupSystem entityLookup)
+        public AdminNameOverlay(AdminSystem system, IEntityManager entityManager, IEyeManager eyeManager, IResourceCache resourceCache, EntityLookupSystem entityLookup)
         {
             _system = system;
             _entityManager = entityManager;
index 4093dcfbd77d76084a4373433c9d864a37130f62..3502faf9e8e83eac971f10d0729c9000dc9ed3f1 100644 (file)
@@ -7,7 +7,7 @@ namespace Content.Client.Administration.Systems
     public sealed partial class AdminSystem
     {
         [Dependency] private readonly IOverlayManager _overlayManager = default!;
-        [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+        [Dependency] private readonly IResourceCache _resourceCache = default!;
         [Dependency] private readonly IClientAdminManager _adminManager = default!;
         [Dependency] private readonly IEyeManager _eyeManager = default!;
         [Dependency] private readonly EntityLookupSystem _entityLookup = default!;
index 89c4d8d7cf2bb527e02ec22a38ca557f02a99e74..eede3a6217f007d7d9e794968027fc73985f39d7 100644 (file)
@@ -34,7 +34,7 @@ public sealed class ExplosionDebugOverlay : Overlay
     {
         IoCManager.InjectDependencies(this);
 
-        var cache = IoCManager.Resolve<IClientResourceCache>();
+        var cache = IoCManager.Resolve<IResourceCache>();
         _font = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 8);
     }
 
index 4832aa5a9395c7740a17ec4475fa271e32da9968..eeda2a31020988be629f0b101b42e2d0e7633426 100644 (file)
@@ -65,7 +65,7 @@ namespace Content.Client.Arcade
 
             MinSize = SetSize = new Vector2(410, 490);
 
-            var resourceCache = IoCManager.Resolve<IClientResourceCache>();
+            var resourceCache = IoCManager.Resolve<IResourceCache>();
             var backgroundTexture = resourceCache.GetTexture("/Textures/Interface/Nano/button.svg.96dpi.png");
 
             _mainPanel = new PanelContainer();
index 132f404acdcdd4d1bb36c3376aa867d031b23838..78185ce6b0e679f9599e38dcf4595cfd1c59a8ac 100644 (file)
@@ -12,7 +12,7 @@ namespace Content.Client.Atmos.EntitySystems
     [UsedImplicitly]
     public sealed class GasTileOverlaySystem : SharedGasTileOverlaySystem
     {
-        [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+        [Dependency] private readonly IResourceCache _resourceCache = default!;
         [Dependency] private readonly IOverlayManager _overlayMan = default!;
         [Dependency] private readonly SpriteSystem _spriteSys = default!;
 
index 90df195485ce385ab7be63d20cc144b95f85e215..ef65d43fe85ecaa019955524eb1013323b61de9b 100644 (file)
@@ -47,7 +47,7 @@ namespace Content.Client.Atmos.Overlays
 
         public const int GasOverlayZIndex = (int) Shared.DrawDepth.DrawDepth.Effects; // Under ghosts, above mostly everything else
 
-        public GasTileOverlay(GasTileOverlaySystem system, IEntityManager entManager, IClientResourceCache resourceCache, IPrototypeManager protoMan, SpriteSystem spriteSys)
+        public GasTileOverlay(GasTileOverlaySystem system, IEntityManager entManager, IResourceCache resourceCache, IPrototypeManager protoMan, SpriteSystem spriteSys)
         {
             _entManager = entManager;
             _mapManager = IoCManager.Resolve<IMapManager>();
index 10065b6583e2cc161ff78209321aa78f1f02306b..aebacb94f63be0e05b9dc1fa392e8b57e356ad59 100644 (file)
@@ -1,21 +1,16 @@
+using System.Linq;
+using System.Numerics;
 using Content.Shared.Audio;
 using Content.Shared.CCVar;
+using Robust.Client.GameObjects;
 using Robust.Client.Graphics;
 using Robust.Client.Player;
 using Robust.Shared.Audio;
-using Robust.Shared.Log;
 using Robust.Shared.Configuration;
-using Robust.Shared.Map;
 using Robust.Shared.Physics;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
-using System.Linq;
-using System.Numerics;
-using Robust.Client.GameObjects;
-using Robust.Shared.Audio.Effects;
-using Robust.Shared.Audio.Systems;
-using Robust.Shared.Player;
 
 namespace Content.Client.Audio;
 //TODO: This is using a incomplete version of the whole "only play nearest sounds" algo, that breaks down a bit should the ambient sound cap get hit.
@@ -46,18 +41,14 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
     private TimeSpan _targetTime = TimeSpan.Zero;
     private float _ambienceVolume = 0.0f;
 
-    private static AudioParams _params = AudioParams.Default
-        .WithVariation(0.01f)
-        .WithLoop(true)
-        .WithAttenuation(Attenuation.LinearDistance)
-        .WithMaxDistance(7f);
+    private static AudioParams _params = AudioParams.Default.WithVariation(0.01f).WithLoop(true).WithAttenuation(Attenuation.LinearDistance);
 
     /// <summary>
     /// How many times we can be playing 1 particular sound at once.
     /// </summary>
     private int MaxSingleSound => (int) (_maxAmbientCount / (16.0f / 6.0f));
 
-    private readonly Dictionary<AmbientSoundComponent, (EntityUid? Stream, SoundSpecifier Sound, string Path)> _playingSounds = new();
+    private readonly Dictionary<Entity<AmbientSoundComponent>, (IPlayingAudioStream? Stream, SoundSpecifier Sound, string Path)> _playingSounds = new();
     private readonly Dictionary<string, int> _playingCount = new();
 
     public bool OverlayEnabled
@@ -107,10 +98,10 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
 
     private void OnShutdown(EntityUid uid, AmbientSoundComponent component, ComponentShutdown args)
     {
-        if (!_playingSounds.Remove(component, out var sound))
+        if (!_playingSounds.Remove((uid, component), out var sound))
             return;
 
-        _audio.Stop(sound.Stream);
+        sound.Stream?.Stop();
         _playingCount[sound.Path] -= 1;
         if (_playingCount[sound.Path] == 0)
             _playingCount.Remove(sound.Path);
@@ -120,13 +111,13 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
     {
         _ambienceVolume = value;
 
-        foreach (var (comp, values) in _playingSounds)
+        foreach (var ((_, comp), values) in _playingSounds)
         {
             if (values.Stream == null)
                 continue;
 
-            var stream = values.Stream;
-            _audio.SetVolume(stream, _params.Volume + comp.Volume + _ambienceVolume);
+            var stream = (AudioSystem.PlayingStream) values.Stream;
+            stream.Volume = _params.Volume + comp.Volume + _ambienceVolume;
         }
     }
     private void SetCooldown(float value) => _cooldown = value;
@@ -186,7 +177,7 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
     {
         foreach (var (stream, _, _) in _playingSounds.Values)
         {
-            _audio.Stop(stream);
+            stream?.Stop();
         }
 
         _playingSounds.Clear();
@@ -195,7 +186,7 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
 
     private readonly struct QueryState
     {
-        public readonly Dictionary<string, List<(float Importance, AmbientSoundComponent)>> SourceDict = new();
+        public readonly Dictionary<string, List<(float Importance, Entity<AmbientSoundComponent>)>> SourceDict = new();
         public readonly Vector2 MapPos;
         public readonly TransformComponent Player;
         public readonly EntityQuery<TransformComponent> Query;
@@ -233,7 +224,7 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
 
         // Prioritize far away & loud sounds.
         var importance = range * (ambientComp.Volume + 32);
-        state.SourceDict.GetOrNew(key).Add((importance, ambientComp));
+        state.SourceDict.GetOrNew(key).Add((importance, (ambientComp.Owner, ambientComp)));
         return true;
     }
 
@@ -247,9 +238,10 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
         var mapPos = playerXform.MapPosition;
 
         // Remove out-of-range ambiences
-        foreach (var (comp, sound) in _playingSounds)
+        foreach (var (ent, sound) in _playingSounds)
         {
-            var entity = comp.Owner;
+            var entity = ent.Owner;
+            var comp = ent.Comp;
 
             if (comp.Enabled &&
                 // Don't keep playing sounds that have changed since.
@@ -266,8 +258,8 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
                     continue;
             }
 
-            _audio.Stop(sound.Stream);
-            _playingSounds.Remove(comp);
+            sound.Stream?.Stop();
+            _playingSounds.Remove((entity, comp));
             _playingCount[sound.Path] -= 1;
             if (_playingCount[sound.Path] == 0)
                 _playingCount.Remove(sound.Path);
@@ -292,11 +284,12 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
 
             sources.Sort(static (a, b) => b.Importance.CompareTo(a.Importance));
 
-            foreach (var (_, comp) in sources)
+            foreach (var (_, ent) in sources)
             {
-                var uid = comp.Owner;
+                var uid = ent.Owner;
+                var comp = ent.Comp;
 
-                if (_playingSounds.ContainsKey(comp) ||
+                if (_playingSounds.ContainsKey(ent) ||
                     metaQuery.GetComponent(uid).EntityPaused)
                     continue;
 
@@ -306,8 +299,11 @@ public sealed class AmbientSoundSystem : SharedAmbientSoundSystem
                     .WithPlayOffset(_random.NextFloat(0.0f, 100.0f))
                     .WithMaxDistance(comp.Range);
 
-                var stream = _audio.PlayEntity(comp.Sound, Filter.Local(), uid, false, audioParams);
-                _playingSounds[comp] = (stream.Value.Entity, comp.Sound, key);
+                var stream = _audio.PlayPvs(comp.Sound, uid, audioParams);
+                if (stream == null)
+                    continue;
+
+                _playingSounds[ent] = (stream, comp.Sound, key);
                 playingCount++;
 
                 if (_playingSounds.Count >= _maxAmbientCount)
index a26603bf7463ed9ecfcf5a59497bbfd0800542b5..0b31db24639e1ddb69171a23de5dec44490b9eef 100644 (file)
@@ -5,7 +5,6 @@ using JetBrains.Annotations;
 using Robust.Client;
 using Robust.Client.State;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Player;
 
@@ -22,7 +21,7 @@ public sealed class BackgroundAudioSystem : EntitySystem
 
     private readonly AudioParams _lobbyParams = new(-5f, 1, "Master", 0, 0, 0, true, 0f);
 
-    private EntityUid? _lobbyStream;
+    private IPlayingAudioStream? _lobbyStream;
 
     public override void Initialize()
     {
@@ -119,11 +118,12 @@ public sealed class BackgroundAudioSystem : EntitySystem
         }
 
         _lobbyStream = _audio.PlayGlobal(file, Filter.Local(), false,
-            _lobbyParams.WithVolume(_lobbyParams.Volume + _configManager.GetCVar(CCVars.LobbyMusicVolume)))?.Entity;
+            _lobbyParams.WithVolume(_lobbyParams.Volume + _configManager.GetCVar(CCVars.LobbyMusicVolume)));
     }
 
     private void EndLobbyMusic()
     {
-        _lobbyStream = _audio.Stop(_lobbyStream);
+        _lobbyStream?.Stop();
+        _lobbyStream = null;
     }
 }
index 1d98564090a14f0ec9069624c1b0d955a912a61b..792f149d1808734519c73b2168f0be271c491866 100644 (file)
@@ -2,7 +2,6 @@
 using Content.Shared.CCVar;
 using Content.Shared.GameTicking;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Player;
 
@@ -15,11 +14,11 @@ public sealed class ClientGlobalSoundSystem : SharedGlobalSoundSystem
 
     // Admin music
     private bool _adminAudioEnabled = true;
-    private List<EntityUid?> _adminAudio = new(1);
+    private List<IPlayingAudioStream?> _adminAudio = new(1);
 
     // Event sounds (e.g. nuke timer)
     private bool _eventAudioEnabled = true;
-    private Dictionary<StationEventMusicType, EntityUid?> _eventAudio = new(1);
+    private Dictionary<StationEventMusicType, IPlayingAudioStream?> _eventAudio = new(1);
 
     public override void Initialize()
     {
@@ -50,13 +49,13 @@ public sealed class ClientGlobalSoundSystem : SharedGlobalSoundSystem
     {
         foreach (var stream in _adminAudio)
         {
-            _audio.Stop(stream);
+            stream?.Stop();
         }
         _adminAudio.Clear();
 
-        foreach (var stream in _eventAudio.Values)
+        foreach (var (_, stream) in _eventAudio)
         {
-            _audio.Stop(stream);
+            stream?.Stop();
         }
 
         _eventAudio.Clear();
@@ -67,7 +66,7 @@ public sealed class ClientGlobalSoundSystem : SharedGlobalSoundSystem
         if(!_adminAudioEnabled) return;
 
         var stream = _audio.PlayGlobal(soundEvent.Filename, Filter.Local(), false, soundEvent.AudioParams);
-        _adminAudio.Add(stream.Value.Entity);
+        _adminAudio.Add(stream);
     }
 
     private void PlayStationEventMusic(StationEventMusicEvent soundEvent)
@@ -76,7 +75,7 @@ public sealed class ClientGlobalSoundSystem : SharedGlobalSoundSystem
         if(!_eventAudioEnabled || _eventAudio.ContainsKey(soundEvent.Type)) return;
 
         var stream = _audio.PlayGlobal(soundEvent.Filename, Filter.Local(), false, soundEvent.AudioParams);
-        _eventAudio.Add(soundEvent.Type, stream.Value.Entity);
+        _eventAudio.Add(soundEvent.Type, stream);
     }
 
     private void PlayGameSound(GameGlobalSoundEvent soundEvent)
@@ -86,10 +85,8 @@ public sealed class ClientGlobalSoundSystem : SharedGlobalSoundSystem
 
     private void StopStationEventMusic(StopStationEventMusic soundEvent)
     {
-        if (!_eventAudio.TryGetValue(soundEvent.Type, out var stream))
-            return;
-
-        _audio.Stop(stream);
+        if (!_eventAudio.TryGetValue(soundEvent.Type, out var stream)) return;
+        stream?.Stop();
         _eventAudio.Remove(soundEvent.Type);
     }
 
@@ -99,7 +96,7 @@ public sealed class ClientGlobalSoundSystem : SharedGlobalSoundSystem
         if (_adminAudioEnabled) return;
         foreach (var stream in _adminAudio)
         {
-            _audio.Stop(stream);
+            stream?.Stop();
         }
         _adminAudio.Clear();
     }
@@ -110,7 +107,7 @@ public sealed class ClientGlobalSoundSystem : SharedGlobalSoundSystem
         if (_eventAudioEnabled) return;
         foreach (var stream in _eventAudio)
         {
-            _audio.Stop(stream.Value);
+            stream.Value?.Stop();
         }
         _eventAudio.Clear();
     }
index 525b09b2c6f9ef7765ee0e7284f34769cc7b8fd0..15fc53222e8dd9974738889be54e835475cb309c 100644 (file)
@@ -9,12 +9,10 @@ using Robust.Client.Player;
 using Robust.Client.ResourceManagement;
 using Robust.Client.State;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
-using Robust.Shared.ResourceManagement.ResourceTypes;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
 
@@ -26,7 +24,7 @@ public sealed partial class ContentAudioSystem
     [Dependency] private readonly IGameTiming _timing = default!;
     [Dependency] private readonly IPlayerManager _player = default!;
     [Dependency] private readonly IPrototypeManager _proto = default!;
-    [Dependency] private readonly IClientResourceCache _resource = default!;
+    [Dependency] private readonly IResourceCache _resource = default!;
     [Dependency] private readonly IRobustRandom _random = default!;
     [Dependency] private readonly IStateManager _state = default!;
     [Dependency] private readonly RulesSystem _rules = default!;
@@ -41,7 +39,7 @@ public sealed partial class ContentAudioSystem
     // Don't need to worry about this being serializable or pauseable as it doesn't affect the sim.
     private TimeSpan _nextAudio;
 
-    private EntityUid? _ambientMusicStream;
+    private AudioSystem.PlayingStream? _ambientMusicStream;
     private AmbientMusicPrototype? _musicProto;
 
     /// <summary>
@@ -85,7 +83,7 @@ public sealed partial class ContentAudioSystem
 
         if (_ambientMusicStream != null && _musicProto != null)
         {
-            _audio.SetVolume(_ambientMusicStream, _musicProto.Sound.Params.Volume + _volumeSlider);
+            _ambientMusicStream.Volume = _musicProto.Sound.Params.Volume + _volumeSlider;
         }
     }
 
@@ -94,7 +92,7 @@ public sealed partial class ContentAudioSystem
         _configManager.UnsubValueChanged(CCVars.AmbientMusicVolume, AmbienceCVarChanged);
         _proto.PrototypesReloaded -= OnProtoReload;
         _state.OnStateChanged -= OnStateChange;
-        _ambientMusicStream = _audio.Stop(_ambientMusicStream);
+        _ambientMusicStream?.Stop();
     }
 
     private void OnProtoReload(PrototypesReloadedEventArgs obj)
@@ -131,7 +129,8 @@ public sealed partial class ContentAudioSystem
     private void OnRoundEndMessage(RoundEndMessageEvent ev)
     {
         // If scoreboard shows then just stop the music
-        _ambientMusicStream = _audio.Stop(_ambientMusicStream);
+        _ambientMusicStream?.Stop();
+        _ambientMusicStream = null;
         _nextAudio = TimeSpan.FromMinutes(3);
     }
 
@@ -171,7 +170,7 @@ public sealed partial class ContentAudioSystem
             return;
         }
 
-        var isDone = !Exists(_ambientMusicStream);
+        var isDone = _ambientMusicStream?.Done;
 
         if (_interruptable)
         {
@@ -179,7 +178,7 @@ public sealed partial class ContentAudioSystem
 
             if (player == null || _musicProto == null || !_rules.IsTrue(player.Value, _proto.Index<RulesPrototype>(_musicProto.Rules)))
             {
-                FadeOut(_ambientMusicStream, duration: AmbientMusicFadeTime);
+                FadeOut(_ambientMusicStream, AmbientMusicFadeTime);
                 _musicProto = null;
                 _interruptable = false;
                 isDone = true;
@@ -222,11 +221,14 @@ public sealed partial class ContentAudioSystem
             false,
             AudioParams.Default.WithVolume(_musicProto.Sound.Params.Volume + _volumeSlider));
 
-        _ambientMusicStream = strim.Value.Entity;
-
-        if (_musicProto.FadeIn)
+        if (strim != null)
         {
-            FadeIn(_ambientMusicStream, strim.Value.Component, AmbientMusicFadeTime);
+            _ambientMusicStream = (AudioSystem.PlayingStream) strim;
+
+            if (_musicProto.FadeIn)
+            {
+                FadeIn(_ambientMusicStream, AmbientMusicFadeTime);
+            }
         }
 
         // Refresh the list
index 726493fdab165756fc9af657baaa8aded7dad9ec..696a5eb32dbbdb9624709b6cf8079d3fcdc718a6 100644 (file)
@@ -1,19 +1,17 @@
 using Content.Shared.Audio;
 using Robust.Client.GameObjects;
-using Robust.Shared.Audio;
-using AudioComponent = Robust.Shared.Audio.Components.AudioComponent;
 
 namespace Content.Client.Audio;
 
 public sealed partial class ContentAudioSystem : SharedContentAudioSystem
 {
     // Need how much volume to change per tick and just remove it when it drops below "0"
-    private readonly Dictionary<EntityUid, float> _fadingOut = new();
+    private readonly Dictionary<AudioSystem.PlayingStream, float> _fadingOut = new();
 
     // Need volume change per tick + target volume.
-    private readonly Dictionary<EntityUid, (float VolumeChange, float TargetVolume)> _fadingIn = new();
+    private readonly Dictionary<AudioSystem.PlayingStream, (float VolumeChange, float TargetVolume)> _fadingIn = new();
 
-    private readonly List<EntityUid> _fadeToRemove = new();
+    private readonly List<AudioSystem.PlayingStream> _fadeToRemove = new();
 
     private const float MinVolume = -32f;
     private const float DefaultDuration = 2f;
@@ -44,28 +42,28 @@ public sealed partial class ContentAudioSystem : SharedContentAudioSystem
 
     #region Fades
 
-    public void FadeOut(EntityUid? stream, AudioComponent? component = null, float duration = DefaultDuration)
+    public void FadeOut(AudioSystem.PlayingStream? stream, float duration = DefaultDuration)
     {
-        if (stream == null || duration <= 0f || !Resolve(stream.Value, ref component))
+        if (stream == null || duration <= 0f)
             return;
 
         // Just in case
         // TODO: Maybe handle the removals by making it seamless?
-        _fadingIn.Remove(stream.Value);
-        var diff = component.Volume - MinVolume;
-        _fadingOut.Add(stream.Value, diff / duration);
+        _fadingIn.Remove(stream);
+        var diff = stream.Volume - MinVolume;
+        _fadingOut.Add(stream, diff / duration);
     }
 
-    public void FadeIn(EntityUid? stream, AudioComponent? component = null, float duration = DefaultDuration)
+    public void FadeIn(AudioSystem.PlayingStream? stream, float duration = DefaultDuration)
     {
-        if (stream == null || duration <= 0f || !Resolve(stream.Value, ref component) || component.Volume < MinVolume)
+        if (stream == null || duration <= 0f || stream.Volume < MinVolume)
             return;
 
-        _fadingOut.Remove(stream.Value);
-        var curVolume = component.Volume;
+        _fadingOut.Remove(stream);
+        var curVolume = stream.Volume;
         var change = (curVolume - MinVolume) / duration;
-        _fadingIn.Add(stream.Value, (change, component.Volume));
-        component.Volume = MinVolume;
+        _fadingIn.Add(stream, (change, stream.Volume));
+        stream.Volume = MinVolume;
     }
 
     private void UpdateFades(float frameTime)
@@ -74,18 +72,19 @@ public sealed partial class ContentAudioSystem : SharedContentAudioSystem
 
         foreach (var (stream, change) in _fadingOut)
         {
-            if (!TryComp(stream, out AudioComponent? component))
+            // Cancelled elsewhere
+            if (stream.Done)
             {
                 _fadeToRemove.Add(stream);
                 continue;
             }
 
-            var volume = component.Volume - change * frameTime;
-            component.Volume = MathF.Max(MinVolume, volume);
+            var volume = stream.Volume - change * frameTime;
+            stream.Volume = MathF.Max(MinVolume, volume);
 
-            if (component.Volume.Equals(MinVolume))
+            if (stream.Volume.Equals(MinVolume))
             {
-                _audio.Stop(stream);
+                stream.Stop();
                 _fadeToRemove.Add(stream);
             }
         }
@@ -100,16 +99,16 @@ public sealed partial class ContentAudioSystem : SharedContentAudioSystem
         foreach (var (stream, (change, target)) in _fadingIn)
         {
             // Cancelled elsewhere
-            if (!TryComp(stream, out AudioComponent? component))
+            if (stream.Done)
             {
                 _fadeToRemove.Add(stream);
                 continue;
             }
 
-            var volume = component.Volume + change * frameTime;
-            component.Volume = MathF.Min(target, volume);
+            var volume = stream.Volume + change * frameTime;
+            stream.Volume = MathF.Min(target, volume);
 
-            if (component.Volume.Equals(target))
+            if (stream.Volume.Equals(target))
             {
                 _fadeToRemove.Add(stream);
             }
index 83397d6a36d215963b1452a0583609bcf802e6ab..d1e2bc7533edbc43859735f708ccb5f5645a5148 100644 (file)
@@ -7,7 +7,6 @@ using Robust.Client.ResourceManagement;
 using Robust.Client.UserInterface;
 using Robust.Client.UserInterface.Controls;
 using Robust.Client.UserInterface.XAML;
-using Robust.Shared.ContentPack;
 using Robust.Shared.Utility;
 using static Content.Client.Changelog.ChangelogManager;
 using static Robust.Client.UserInterface.Controls.BoxContainer;
@@ -18,7 +17,7 @@ namespace Content.Client.Changelog;
 public sealed partial class ChangelogTab : Control
 {
     [Dependency] private readonly ChangelogManager _changelog = default!;
-    [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+    [Dependency] private readonly IResourceCache _resourceCache = default!;
 
     public bool AdminOnly;
 
index b90289a02211b0093c1e98b83dbdc24d2512a50f..6a77c7e05436a1133433237bba86345dbd76f0b7 100644 (file)
@@ -23,7 +23,7 @@ namespace Content.Client.Clickable
         private const float Threshold = 0.25f;
         private const int ClickRadius = 2;
 
-        [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+        [Dependency] private readonly IResourceCache _resourceCache = default!;
 
         [ViewVariables]
         private readonly Dictionary<Texture, ClickMap> _textureMaps = new();
index 1dd0fed137184f68aa664faecbd88976d075b74d..b16e14d65355797af7981afbf797c53304a93e19 100644 (file)
@@ -45,7 +45,7 @@ public sealed class ClientClothingSystem : ClothingSystem
         {"suitstorage", "SUITSTORAGE"},
     };
 
-    [Dependency] private readonly IClientResourceCache _cache = default!;
+    [Dependency] private readonly IResourceCache _cache = default!;
     [Dependency] private readonly InventorySystem _inventorySystem = default!;
 
     public override void Initialize()
index 60ac57984546e3c94332ebd7585f4bfba1b6d1ef..666ff2aa48bb0bb153c6920554a291061ec3c74b 100644 (file)
@@ -11,7 +11,6 @@ using Robust.Client.UserInterface.Controls;
 using Robust.Client.UserInterface.CustomControls;
 using Robust.Client.UserInterface.XAML;
 using Robust.Shared.Configuration;
-using Robust.Shared.ContentPack;
 using Robust.Shared.IoC;
 using Robust.Shared.Localization;
 using Robust.Shared.Maths;
@@ -24,7 +23,7 @@ namespace Content.Client.Credits
     [GenerateTypedNameReferences]
     public sealed partial class CreditsWindow : DefaultWindow
     {
-        [Dependency] private readonly IResourceManager _resourceManager = default!;
+        [Dependency] private readonly IResourceCache _resourceManager = default!;
         [Dependency] private readonly IConfigurationManager _cfg = default!;
 
         private static readonly Dictionary<string, int> PatronTierPriority = new()
@@ -50,7 +49,7 @@ namespace Content.Client.Credits
 
         private void PopulateLicenses(BoxContainer licensesContainer)
         {
-            foreach (var entry in CreditsManager.GetLicenses(_resourceManager).OrderBy(p => p.Name))
+            foreach (var entry in CreditsManager.GetLicenses().OrderBy(p => p.Name))
             {
                 licensesContainer.AddChild(new Label {StyleClasses = {StyleBase.StyleClassLabelHeading}, Text = entry.Name});
 
index b491dbaa480a9ee650534a318cdc84fc83003f50..2d6a89101c7166196f7600716d1340e0fc310dc0 100644 (file)
@@ -12,7 +12,7 @@ namespace Content.Client.Decals.UI;
 public sealed partial class PaletteColorPicker : DefaultWindow
 {
     [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
-    [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+    [Dependency] private readonly IResourceCache _resourceCache = default!;
 
     private readonly TextureResource _tex;
 
index 344bd2ec979ab525c4f82c1e9b35d993478356c4..d10101754cc783ce0eb18df31c7a4d2dc5ec83b9 100644 (file)
@@ -6,8 +6,6 @@ using Content.Shared.Emag.Systems;
 using Robust.Client.GameObjects;
 using Robust.Client.Animations;
 using Robust.Client.Graphics;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.GameStates;
 using Robust.Shared.Physics.Events;
 using static Content.Shared.Disposal.Components.SharedDisposalUnitComponent;
index ccdd9c48cd5935fdd2ba336df90be1f3a78f5ea3..4b82d3506aedd143d8c56c4317fed063fc5f1062 100644 (file)
@@ -14,7 +14,7 @@ public sealed class DoorSystem : SharedDoorSystem
 {
     [Dependency] private readonly AnimationPlayerSystem _animationSystem = default!;
     [Dependency] private readonly IGameTiming _gameTiming = default!;
-    [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+    [Dependency] private readonly IResourceCache _resourceCache = default!;
 
     public override void Initialize()
     {
@@ -138,6 +138,6 @@ public sealed class DoorSystem : SharedDoorSystem
     protected override void PlaySound(EntityUid uid, SoundSpecifier soundSpecifier, AudioParams audioParams, EntityUid? predictingPlayer, bool predicted)
     {
         if (GameTiming.InPrediction && GameTiming.IsFirstTimePredicted)
-            Audio.PlayEntity(soundSpecifier, Filter.Local(), uid, false, audioParams);
+            Audio.Play(soundSpecifier, Filter.Local(), uid, false, audioParams);
     }
 }
index a6188bf948be0c39809916335e380f1e2f41a4b8..60208ea1a0d1414a6bbf3537785efd4f21ff4910 100644 (file)
@@ -15,7 +15,7 @@ namespace Content.Client.Explosion;
 public sealed class ExplosionOverlaySystem : EntitySystem
 {
     [Dependency] private readonly IPrototypeManager _protoMan = default!;
-    [Dependency] private readonly IClientResourceCache _resCache = default!;
+    [Dependency] private readonly IResourceCache _resCache = default!;
     [Dependency] private readonly IOverlayManager _overlayMan = default!;
     [Dependency] private readonly SharedPointLightSystem _lights = default!;
 
index 021582faa514c6b124c9dcd29688842337a8b4f3..c1fba48309456b868527a9a7f05363c7e4928e3c 100644 (file)
@@ -17,7 +17,7 @@ public sealed partial class AdminFaxWindow : DefaultWindow
     public Action<(NetEntity entity, string title, string stampedBy, string message, string stampSprite, Color stampColor)>? OnMessageSend;
     public Action<NetEntity>? OnFollowFax;
 
-    [Dependency] private readonly IClientResourceCache _resCache = default!;
+    [Dependency] private readonly IResourceCache _resCache = default!;
 
     public AdminFaxWindow()
     {
index 035d7e893b50bea0be7b5b3e035e0ba0d2688551..8c8b13a1efe78ca8fb1d78ed0f91b50f0c6df4de 100644 (file)
@@ -27,7 +27,7 @@ public sealed class PuddleOverlay : Overlay
     {
         IoCManager.InjectDependencies(this);
         _debugOverlaySystem = _entitySystemManager.GetEntitySystem<PuddleDebugOverlaySystem>();
-        var cache = IoCManager.Resolve<IClientResourceCache>();
+        var cache = IoCManager.Resolve<IResourceCache>();
         _font = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 8);
     }
 
index a25b592f574ad30f2fe1477af785ec1ef7928c87..e363ae764bf7dba46ff0a58c1370014e4e16112f 100644 (file)
@@ -7,8 +7,6 @@ using Content.Shared.GameWindow;
 using JetBrains.Annotations;
 using Robust.Client.Graphics;
 using Robust.Client.State;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Player;
 using Robust.Shared.Utility;
index 55becdd3950fa61b292ff5e62156eef37dd95522..fee072051ab3e4d53212cf63403149d7ca6ea2b0 100644 (file)
@@ -3,7 +3,6 @@ using Content.Shared.Camera;
 using Content.Shared.Gravity;
 using Robust.Client.Player;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
 
index dffc625cb8623c05b9ba28296b2429f26fd6d935..8ef6f13e31d5e4c08fad859b44b98220c9920299 100644 (file)
@@ -9,8 +9,6 @@ using Content.Shared.Tag;
 using Content.Shared.Verbs;
 using Robust.Client.GameObjects;
 using Robust.Client.Player;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Player;
 using Robust.Shared.Timing;
index 7a763a1d6f4b2e4d2d1ec53a8419aefa315e245e..2905857b393e667472458aa00fb293d78600626a 100644 (file)
@@ -11,7 +11,7 @@ namespace Content.Client.Info
 {
     public sealed class RulesAndInfoWindow : DefaultWindow
     {
-        [Dependency] private readonly IResourceManager _resourceManager = default!;
+        [Dependency] private readonly IResourceCache _resourceManager = default!;
         [Dependency] private readonly RulesManager _rules = default!;
 
         public RulesAndInfoWindow()
index 767a9f01ecc7eb58e6d14d424ce5ced220e39ce6..9cbe8053e3818f447271e420aaf6f5ae64d1c674 100644 (file)
@@ -1,11 +1,10 @@
 using Robust.Client.ResourceManagement;
-using Robust.Shared.ContentPack;
 using Robust.Shared.IoC;
 
 namespace Content.Client.IoC
 {
     public static class StaticIoC
     {
-        public static IClientResourceCache ResC => IoCManager.Resolve<IClientResourceCache>();
+        public static IResourceCache ResC => IoCManager.Resolve<IResourceCache>();
     }
 }
index 70a845f57e440889614b3dcb4cd15c14b107a904..e406ba2b5574639d6d2d5a73d9c8ee0716397cf1 100644 (file)
@@ -12,7 +12,7 @@ namespace Content.Client.Items.Systems;
 
 public sealed class ItemSystem : SharedItemSystem
 {
-    [Dependency] private readonly IClientResourceCache _resCache = default!;
+    [Dependency] private readonly IResourceCache _resCache = default!;
 
     public override void Initialize()
     {
index f5dbcc297e7aef8d8d62b7d8e0703ba740b40220..2ce0249fc1f088d0a3ad7286a046619c637916f9 100644 (file)
@@ -44,7 +44,7 @@ public sealed partial class ExpendableLightComponent : SharedExpendableLightComp
     /// The sound that plays when the expendable light is lit.
     /// </summary>
     [Access(typeof(ExpendableLightSystem))]
-    public EntityUid? PlayingStream;
+    public IPlayingAudioStream? PlayingStream;
 }
 
 public enum ExpendableLightVisualLayers : byte
index a2a7fb2531c96402a457470c13468816c9343efa..6e9e546dfa3e66e69e3286aa440d700068e887ee 100644 (file)
@@ -2,8 +2,6 @@ using Content.Client.Light.Components;
 using Content.Shared.Light.Components;
 using Robust.Client.GameObjects;
 using Robust.Client.Graphics;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Client.Light.EntitySystems;
 
@@ -21,7 +19,7 @@ public sealed class ExpendableLightSystem : VisualizerSystem<ExpendableLightComp
 
     private void OnLightShutdown(EntityUid uid, ExpendableLightComponent component, ComponentShutdown args)
     {
-        component.PlayingStream = _audioSystem.Stop(component.PlayingStream);
+        component.PlayingStream?.Stop();
     }
 
     protected override void OnAppearanceChange(EntityUid uid, ExpendableLightComponent comp, ref AppearanceChangeEvent args)
@@ -50,10 +48,12 @@ public sealed class ExpendableLightSystem : VisualizerSystem<ExpendableLightComp
         switch (state)
         {
             case ExpendableLightState.Lit:
-                _audioSystem.Stop(comp.PlayingStream);
+                comp.PlayingStream?.Stop();
                 comp.PlayingStream = _audioSystem.PlayPvs(
-                    comp.LoopedSound, uid, SharedExpendableLightComponent.LoopedSoundParams)?.Entity;
-
+                    comp.LoopedSound,
+                    uid,
+                    SharedExpendableLightComponent.LoopedSoundParams
+                );
                 if (args.Sprite.LayerMapTryGet(ExpendableLightVisualLayers.Overlay, out var layerIdx, true))
                 {
                     if (!string.IsNullOrWhiteSpace(comp.IconStateLit))
@@ -73,7 +73,7 @@ public sealed class ExpendableLightSystem : VisualizerSystem<ExpendableLightComp
 
                 break;
             case ExpendableLightState.Dead:
-                comp.PlayingStream = _audioSystem.Stop(comp.PlayingStream);
+                comp.PlayingStream?.Stop();
                 if (args.Sprite.LayerMapTryGet(ExpendableLightVisualLayers.Overlay, out layerIdx, true))
                 {
                     if (!string.IsNullOrWhiteSpace(comp.IconStateSpent))
index e7fcf7e219fc48ef3eefa7a08a206ad53b8e3dc1..bf69053d9a213486ac03c0346cfdee907b60cceb 100644 (file)
@@ -2,8 +2,6 @@ using Content.Shared.Light;
 using Robust.Client.Animations;
 using Robust.Client.GameObjects;
 using Robust.Shared.Animations;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
 
 namespace Content.Client.Light.Visualizers;
index eee39e32e019d9078a1906242e629053621ed473..457163a5b5bef94a26256f5f81853b2d1aacdab9 100644 (file)
@@ -13,7 +13,6 @@ using Robust.Client.UserInterface;
 using Robust.Client.UserInterface.Controls;
 using Robust.Shared.Configuration;
 using Robust.Shared.Prototypes;
-using Robust.Shared.ResourceManagement.ResourceTypes;
 using Robust.Shared.Timing;
 
 
@@ -24,7 +23,7 @@ namespace Content.Client.Lobby
         [Dependency] private readonly IBaseClient _baseClient = default!;
         [Dependency] private readonly IClientConsoleHost _consoleHost = default!;
         [Dependency] private readonly IEntityManager _entityManager = default!;
-        [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+        [Dependency] private readonly IResourceCache _resourceCache = default!;
         [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
         [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
         [Dependency] private readonly IClientPreferencesManager _preferencesManager = default!;
index e2ea4b3abb16133011e7b55f5b076e8408996a87..43c5bfe56748481111b775f81470410a1dae7d9f 100644 (file)
@@ -23,7 +23,7 @@ namespace Content.Client.MainMenu
         [Dependency] private readonly IClientNetManager _netManager = default!;
         [Dependency] private readonly IConfigurationManager _configurationManager = default!;
         [Dependency] private readonly IGameController _controllerProxy = default!;
-        [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+        [Dependency] private readonly IResourceCache _resourceCache = default!;
         [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
 
         private MainMenuControl _mainMenuControl = default!;
index 5a6484a86fb3eb025c674f994e70de5e853a05e8..1d5244305dca3aa761a6cbc6cfb947401ae814f2 100644 (file)
@@ -11,7 +11,7 @@ namespace Content.Client.MainMenu.UI;
 [GenerateTypedNameReferences]
 public sealed partial class MainMenuControl : Control
 {
-    public MainMenuControl(IClientResourceCache resCache, IConfigurationManager configMan)
+    public MainMenuControl(IResourceCache resCache, IConfigurationManager configMan)
     {
         RobustXamlLoader.Load(this);
 
index 7a5fec1e8e47313cc9fc578eacb3f3ec9b1ad853..ad173f3b29c760b7bcefbde76979efbdc93a23ca 100644 (file)
@@ -12,7 +12,7 @@ public sealed class HTNOverlay : Overlay
 
     public override OverlaySpace Space => OverlaySpace.ScreenSpace;
 
-    public HTNOverlay(IEntityManager entManager, IClientResourceCache resourceCache)
+    public HTNOverlay(IEntityManager entManager, IResourceCache resourceCache)
     {
         _entManager = entManager;
         _font = new VectorFont(resourceCache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 10);
index 41e9d5cb72af5568be73a53244cb33b3378a2ed7..7ea914b8c31f1a46a8d0e5eca1be8e869a95ff24 100644 (file)
@@ -19,7 +19,7 @@ public sealed class HTNSystem : EntitySystem
 
             if (_enableOverlay)
             {
-                overlayManager.AddOverlay(new HTNOverlay(EntityManager, IoCManager.Resolve<IClientResourceCache>()));
+                overlayManager.AddOverlay(new HTNOverlay(EntityManager, IoCManager.Resolve<IResourceCache>()));
                 RaiseNetworkEvent(new RequestHTNMessage()
                 {
                     Enabled = true,
index c2579ab5ecf0fb29932620193bca00f02a32d46f..548edd601ce871bcd133d033e3aa5f949228feb2 100644 (file)
@@ -20,7 +20,7 @@ namespace Content.Client.NPC
         [Dependency] private readonly IGameTiming _timing = default!;
         [Dependency] private readonly IInputManager _inputManager = default!;
         [Dependency] private readonly IMapManager _mapManager = default!;
-        [Dependency] private readonly IClientResourceCache _cache = default!;
+        [Dependency] private readonly IResourceCache _cache = default!;
         [Dependency] private readonly NPCSteeringSystem _steering = default!;
         [Dependency] private readonly MapSystem _mapSystem = default!;
 
@@ -151,7 +151,7 @@ namespace Content.Client.NPC
             IEyeManager eyeManager,
             IInputManager inputManager,
             IMapManager mapManager,
-            IClientResourceCache cache,
+            IResourceCache cache,
             PathfindingSystem system,
             MapSystem mapSystem)
         {
index 55532b57f06ccfd3646ebba8902453f1eaad99db..0a3d7ddad02677e980521c0dbfd249799473a6e4 100644 (file)
@@ -18,7 +18,7 @@ namespace Content.Client.NodeContainer
         [Dependency] private readonly EntityLookupSystem _entityLookup = default!;
         [Dependency] private readonly IMapManager _mapManager = default!;
         [Dependency] private readonly IInputManager _inputManager = default!;
-        [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+        [Dependency] private readonly IResourceCache _resourceCache = default!;
 
         public bool VisEnabled { get; private set; }
 
index b8e2e3bbb7627606213d995d8f9b50d58ab5c3dd..f10eb9ed8b14e0d75ad8862ab7bd026bd20b2787 100644 (file)
@@ -38,7 +38,7 @@ namespace Content.Client.NodeContainer
             EntityLookupSystem lookup,
             IMapManager mapManager,
             IInputManager inputManager,
-            IClientResourceCache cache,
+            IResourceCache cache,
             IEntityManager entityManager)
         {
             _system = system;
index 6a9928b8bdd8f244469b8e71052ac2976d5096e7..5875c4a33a1f15aa025384e5d8c9a8bd500fbcd3 100644 (file)
@@ -1,7 +1,5 @@
 using Content.Shared.CCVar;
-using Robust.Client.Audio;
 using Robust.Client.AutoGenerated;
-using Robust.Client.GameObjects;
 using Robust.Client.Graphics;
 using Robust.Client.UserInterface;
 using Robust.Client.UserInterface.Controls;
@@ -16,14 +14,13 @@ namespace Content.Client.Options.UI.Tabs
     public sealed partial class AudioTab : Control
     {
         [Dependency] private readonly IConfigurationManager _cfg = default!;
-        private readonly AudioSystem _audio;
+        [Dependency] private readonly IClydeAudio _clydeAudio = default!;
 
         public AudioTab()
         {
             RobustXamlLoader.Load(this);
             IoCManager.InjectDependencies(this);
 
-            _audio = IoCManager.Resolve<IEntityManager>().System<AudioSystem>();
             LobbyMusicCheckBox.Pressed = _cfg.GetCVar(CCVars.LobbyMusicEnabled);
             RestartSoundsCheckBox.Pressed = _cfg.GetCVar(CCVars.RestartSoundsEnabled);
             EventMusicCheckBox.Pressed = _cfg.GetCVar(CCVars.EventMusicEnabled);
@@ -82,7 +79,7 @@ namespace Content.Client.Options.UI.Tabs
 
         private void OnMasterVolumeSliderChanged(Range range)
         {
-            _audio.SetMasterVolume(MasterVolumeSlider.Value / 100);
+            _clydeAudio.SetMasterVolume(MasterVolumeSlider.Value / 100);
             UpdateChanges();
         }
 
@@ -111,7 +108,7 @@ namespace Content.Client.Options.UI.Tabs
 
         private void OnApplyButtonPressed(BaseButton.ButtonEventArgs args)
         {
-            _cfg.SetCVar(CVars.AudioMasterVolume, LV100ToDB(MasterVolumeSlider.Value, CCVars.MasterMultiplier));
+            _cfg.SetCVar(CVars.AudioMasterVolume, MasterVolumeSlider.Value / 100);
             // Want the CVar updated values to have the multiplier applied
             // For the UI we just display 0-100 still elsewhere
             _cfg.SetCVar(CVars.MidiVolume, LV100ToDB(MidiVolumeSlider.Value, CCVars.MidiMultiplier));
@@ -135,7 +132,7 @@ namespace Content.Client.Options.UI.Tabs
 
         private void Reset()
         {
-            MasterVolumeSlider.Value = DBToLV100(_cfg.GetCVar(CVars.AudioMasterVolume), CCVars.MasterMultiplier);
+            MasterVolumeSlider.Value = _cfg.GetCVar(CVars.AudioMasterVolume) * 100;
             MidiVolumeSlider.Value = DBToLV100(_cfg.GetCVar(CVars.MidiVolume), CCVars.MidiMultiplier);
             AmbienceVolumeSlider.Value = DBToLV100(_cfg.GetCVar(CCVars.AmbienceVolume), CCVars.AmbienceMultiplier);
             AmbientMusicVolumeSlider.Value =
@@ -153,8 +150,8 @@ namespace Content.Client.Options.UI.Tabs
         // Do be sure to rename the setting though
         private float DBToLV100(float db, float multiplier = 1f)
         {
-            var beri = (float) (Math.Pow(10, db / 10) * 100 / multiplier);
-            return beri;
+            var weh = (float) (Math.Pow(10, db / 10) * 100 / multiplier);
+            return weh;
         }
 
         private float LV100ToDB(float lv100, float multiplier = 1f)
@@ -167,7 +164,7 @@ namespace Content.Client.Options.UI.Tabs
         private void UpdateChanges()
         {
             var isMasterVolumeSame =
-                Math.Abs(MasterVolumeSlider.Value - DBToLV100(_cfg.GetCVar(CVars.AudioMasterVolume), CCVars.MasterMultiplier)) < 0.01f;
+                Math.Abs(MasterVolumeSlider.Value - _cfg.GetCVar(CVars.AudioMasterVolume) * 100) < 0.01f;
             var isMidiVolumeSame =
                 Math.Abs(MidiVolumeSlider.Value - DBToLV100(_cfg.GetCVar(CVars.MidiVolume), CCVars.MidiMultiplier)) < 0.01f;
             var isAmbientVolumeSame =
index 6ff66b3821cdba6e3b381249f88550a70183f15c..c3192a495d61eff36e5a3e8404235a3b62ddb411 100644 (file)
@@ -61,7 +61,7 @@ namespace Content.Client.Paper.UI
             // Randomize the placement of any stamps based on the entity UID
             // so that there's some variety in different papers.
             StampDisplay.PlacementSeed = (int)entity;
-            var resCache = IoCManager.Resolve<IClientResourceCache>();
+            var resCache = IoCManager.Resolve<IResourceCache>();
 
             // Initialize the background:
             PaperBackground.ModulateSelfOverride = visuals.BackgroundModulate;
index 248185949261dd9ac99ffe6748a5f7deaa352a4e..a04508aeba34c4240dd955953128a05761feed08 100644 (file)
@@ -32,7 +32,7 @@ public sealed partial class StampWidget : PanelContainer
     public StampWidget()
     {
         RobustXamlLoader.Load(this);
-        var resCache = IoCManager.Resolve<IClientResourceCache>();
+        var resCache = IoCManager.Resolve<IResourceCache>();
         var borderImage = resCache.GetResource<TextureResource>(
                 "/Textures/Interface/Paper/paper_stamp_border.svg.96dpi.png");
         _borderTexture = new StyleBoxTexture {
index 2e69a5a5625d1f9c3b5f17f5b94db01f15782ad1..81f012d93c6927262b7944ca4ab66cf458ef42ba 100644 (file)
@@ -57,17 +57,16 @@ public sealed partial class GeneratedParallaxTextureSource : IParallaxTextureSou
         }
 
         var debugParallax = IoCManager.Resolve<IConfigurationManager>().GetCVar(CCVars.ParallaxDebug);
-        var resManager = IoCManager.Resolve<IResourceManager>();
 
         if (debugParallax
-            || !resManager.UserData.TryReadAllText(PreviousParallaxConfigPath, out var previousParallaxConfig)
+            || !StaticIoC.ResC.UserData.TryReadAllText(PreviousParallaxConfigPath, out var previousParallaxConfig)
             || previousParallaxConfig != parallaxConfig)
         {
             var table = Toml.ReadString(parallaxConfig);
             await UpdateCachedTexture(table, debugParallax, cancel);
 
             //Update the previous config
-            using var writer = resManager.UserData.OpenWriteText(PreviousParallaxConfigPath);
+            using var writer = StaticIoC.ResC.UserData.OpenWriteText(PreviousParallaxConfigPath);
             writer.Write(parallaxConfig);
         }
 
@@ -82,7 +81,7 @@ public sealed partial class GeneratedParallaxTextureSource : IParallaxTextureSou
             try
             {
                 // Also try to at least sort of fix this if we've been fooled by a config backup
-                resManager.UserData.Delete(PreviousParallaxConfigPath);
+                StaticIoC.ResC.UserData.Delete(PreviousParallaxConfigPath);
             }
             catch (Exception)
             {
@@ -105,34 +104,31 @@ public sealed partial class GeneratedParallaxTextureSource : IParallaxTextureSou
         // And load it in the main thread for safety reasons.
         // But before spending time saving it, make sure to exit out early if it's not wanted.
         cancel.ThrowIfCancellationRequested();
-        var resManager = IoCManager.Resolve<IResourceManager>();
 
         // Store it and CRC so further game starts don't need to regenerate it.
-        await using var imageStream = resManager.UserData.OpenWrite(ParallaxCachedImagePath);
-        await newParallexImage.SaveAsPngAsync(imageStream, cancel);
+        using var imageStream = StaticIoC.ResC.UserData.OpenWrite(ParallaxCachedImagePath);
+        newParallexImage.SaveAsPng(imageStream);
 
         if (saveDebugLayers)
         {
             for (var i = 0; i < debugImages!.Count; i++)
             {
                 var debugImage = debugImages[i];
-                await using var debugImageStream = resManager.UserData.OpenWrite(new ResPath($"/parallax_{Identifier}debug_{i}.png"));
-                await debugImage.SaveAsPngAsync(debugImageStream, cancel);
+                using var debugImageStream = StaticIoC.ResC.UserData.OpenWrite(new ResPath($"/parallax_{Identifier}debug_{i}.png"));
+                debugImage.SaveAsPng(debugImageStream);
             }
         }
     }
 
     private Texture GetCachedTexture()
     {
-        var resManager = IoCManager.Resolve<IResourceManager>();
-        using var imageStream = resManager.UserData.OpenRead(ParallaxCachedImagePath);
+        using var imageStream = StaticIoC.ResC.UserData.OpenRead(ParallaxCachedImagePath);
         return Texture.LoadFromPNGStream(imageStream, "Parallax");
     }
 
     private string? GetParallaxConfig()
     {
-        var resManager = IoCManager.Resolve<IResourceManager>();
-        if (!resManager.TryContentFileRead(ParallaxConfigPath, out var configStream))
+        if (!StaticIoC.ResC.TryContentFileRead(ParallaxConfigPath, out var configStream))
         {
             return null;
         }
index 0422f1fa66ca0a63adf57d9f086155b7bf7851cf..c69e0271372cfa67da0075f4666ce42e44def7bd 100644 (file)
@@ -60,7 +60,7 @@ namespace Content.Client.ParticleAccelerator.UI
             _drawNoiseGenerator.SetFractalType(FastNoiseLite.FractalType.FBm);
             _drawNoiseGenerator.SetFrequency(0.5f);
 
-            var resourceCache = IoCManager.Resolve<IClientResourceCache>();
+            var resourceCache = IoCManager.Resolve<IResourceCache>();
             var font = resourceCache.GetFont("/Fonts/Boxfont-round/Boxfont Round.ttf", 13);
             var panelTex = resourceCache.GetTexture("/Textures/Interface/Nano/button.svg.96dpi.png");
 
@@ -474,7 +474,7 @@ namespace Content.Client.ParticleAccelerator.UI
             private readonly TextureRect _unlit;
             private readonly RSI _rsi;
 
-            public PASegmentControl(ParticleAcceleratorControlMenu menu, IClientResourceCache cache, string name)
+            public PASegmentControl(ParticleAcceleratorControlMenu menu, IResourceCache cache, string name)
             {
                 _menu = menu;
                 _baseState = name;
index 7c222ee4a8ef11a21ade4a324327f4b80ca8dfff..04d8cc76f9b2331948a7057a659680b2569c1847 100644 (file)
@@ -57,7 +57,7 @@ public sealed class NavMapControl : MapGridControl
         IoCManager.InjectDependencies(this);
 
         _transform = _entManager.System<SharedTransformSystem>();
-        var cache = IoCManager.Resolve<IClientResourceCache>();
+        var cache = IoCManager.Resolve<IResourceCache>();
         _font = new VectorFont(cache.GetResource<FontResource>("/EngineFonts/NotoSans/NotoSans-Regular.ttf"), 16);
 
         RectClipContent = true;
index 5914c1b9d352b6fc258e0eb6f02b79b47dd1d88b..5adc2e1ff0c70995a4a7dc77cd3378d65f0ee13c 100644 (file)
@@ -39,7 +39,7 @@ public sealed class PopupOverlay : Overlay
         IEntityManager entManager,
         IPlayerManager playerMgr,
         IPrototypeManager protoManager,
-        IClientResourceCache cache,
+        IResourceCache cache,
         IUserInterfaceManager uiManager,
         PopupSystem popup)
     {
index 4e27b119fc540bb8c19b7d8744a30d7faf6f6d25..d68272a107e4f5541b79edc767237a8e677f637e 100644 (file)
@@ -23,7 +23,7 @@ namespace Content.Client.Popups
         [Dependency] private readonly IOverlayManager _overlay = default!;
         [Dependency] private readonly IPlayerManager _playerManager = default!;
         [Dependency] private readonly IPrototypeManager _prototype = default!;
-        [Dependency] private readonly IClientResourceCache _resource = default!;
+        [Dependency] private readonly IResourceCache _resource = default!;
         [Dependency] private readonly IGameTiming _timing = default!;
         [Dependency] private readonly IUserInterfaceManager _uiManager = default!;
         [Dependency] private readonly IReplayRecordingManager _replayRecording = default!;
index 8ff2f6c2d9e90a90ff554aad9791e1ad8d0a6f8e..f1052086de6603b53ce11cf017b6373ab8506a70 100644 (file)
@@ -42,7 +42,7 @@ namespace Content.Client.Preferences.UI
 
         public CharacterSetupGui(
             IEntityManager entityManager,
-            IClientResourceCache resourceCache,
+            IResourceCache resourceCache,
             IClientPreferencesManager preferencesManager,
             IPrototypeManager prototypeManager,
             IConfigurationManager configurationManager)
index cfa7e27fb81e8112ddcbe3fcccc4981f7abf4113..8c721fa7771d1fdf18ef8e1c7a2577262a5ea465 100644 (file)
@@ -23,7 +23,7 @@ public sealed class RadiationDebugOverlay : Overlay
         IoCManager.InjectDependencies(this);
         _radiation = _entityManager.System<RadiationSystem>();
 
-        var cache = IoCManager.Resolve<IClientResourceCache>();
+        var cache = IoCManager.Resolve<IResourceCache>();
         _font = new VectorFont(cache.GetResource<FontResource>("/Fonts/NotoSans/NotoSans-Regular.ttf"), 8);
     }
 
index b9880f339b0c4cbc1205652d76dbc61265a5f5ee..cbb511725523f74de1ac6f935e17cfbce2029263 100644 (file)
@@ -135,6 +135,7 @@ public sealed class ContentReplayPlaybackManager
         {
             case RoundEndMessageEvent:
             case PopupEvent:
+            case AudioMessage:
             case PickupAnimationEvent:
             case MeleeLungeEvent:
             case SharedGunSystem.HitscanEvent:
index d546a396f521887395225a01e95fa25e6077581c..f3f75a2950d04ede0b0a59698043b18f94e92b6a 100644 (file)
@@ -9,7 +9,7 @@ namespace Content.Client.Replay.UI.Loading;
 [Virtual]
 public class LoadingScreen<TResult> : State
 {
-    [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+    [Dependency] private readonly IResourceCache _resourceCache = default!;
     [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
 
     public event Action<TResult?, Exception?>? OnJobFinished;
index 6847a73ab9c27c5f8ca46abeae5cf2962540b1eb..bbb51114380be13c8c2fa4c007383451df0e8dbb 100644 (file)
@@ -14,7 +14,7 @@ public sealed partial class LoadingScreenControl : Control
 {
     public static SpriteSpecifier Sprite = new SpriteSpecifier.Rsi(new ("/Textures/Mobs/Silicon/Bots/mommi.rsi"), "wiggle");
 
-    public LoadingScreenControl(IClientResourceCache resCache)
+    public LoadingScreenControl(IResourceCache resCache)
     {
         RobustXamlLoader.Load(this);
 
index b5a74afcb6107c58ff77c3971c80fd9805d01b51..be8b8fed3b3a667dd991a44886bda953dee439ec 100644 (file)
@@ -9,27 +9,27 @@ namespace Content.Client.Resources
     [PublicAPI]
     public static class ResourceCacheExtensions
     {
-        public static Texture GetTexture(this IClientResourceCache cache, ResPath path)
+        public static Texture GetTexture(this IResourceCache cache, ResPath path)
         {
             return cache.GetResource<TextureResource>(path);
         }
 
-        public static Texture GetTexture(this IClientResourceCache cache, string path)
+        public static Texture GetTexture(this IResourceCache cache, string path)
         {
             return GetTexture(cache, new ResPath(path));
         }
 
-        public static Font GetFont(this IClientResourceCache cache, ResPath path, int size)
+        public static Font GetFont(this IResourceCache cache, ResPath path, int size)
         {
             return new VectorFont(cache.GetResource<FontResource>(path), size);
         }
 
-        public static Font GetFont(this IClientResourceCache cache, string path, int size)
+        public static Font GetFont(this IResourceCache cache, string path, int size)
         {
             return cache.GetFont(new ResPath(path), size);
         }
 
-        public static Font GetFont(this IClientResourceCache cache, ResPath[] path, int size)
+        public static Font GetFont(this IResourceCache cache, ResPath[] path, int size)
         {
             var fs = new Font[path.Length];
             for (var i = 0; i < path.Length; i++)
@@ -38,7 +38,7 @@ namespace Content.Client.Resources
             return new StackedFont(fs);
         }
 
-        public static Font GetFont(this IClientResourceCache cache, string[] path, int size)
+        public static Font GetFont(this IResourceCache cache, string[] path, int size)
         {
             var rp = new ResPath[path.Length];
             for (var i = 0; i < path.Length; i++)
index cd12f8fc4596a6adaa9230dabc3b5fb34d026582..4476e2a90ae0a79947fefdff5f77c72cdddd33a6 100644 (file)
@@ -10,7 +10,7 @@ namespace Content.Client.SprayPainter;
 
 public sealed class SprayPainterSystem : SharedSprayPainterSystem
 {
-    [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+    [Dependency] private readonly IResourceCache _resourceCache = default!;
 
     public List<SprayPainterEntry> Entries { get; private set; } = new();
 
index 02f21f0bf565ef7731cccb50ffb86f8a826d2532..5068f97e36fd7f739e64cb90840ea02cf86b0c37 100644 (file)
@@ -41,7 +41,7 @@ namespace Content.Client.Stylesheets
         protected StyleBoxTexture BaseAngleRect { get; }
         protected StyleBoxTexture AngleBorderRect { get; }
 
-        protected StyleBase(IClientResourceCache resCache)
+        protected StyleBase(IResourceCache resCache)
         {
             var notoSans12 = resCache.GetFont
             (
index b581c49a9e648f3eef5959149d2c18d58331a529..2ef5a63ac7311bc1262ab84f5978ac96ca4907bf 100644 (file)
@@ -20,7 +20,7 @@ namespace Content.Client.Stylesheets
 {
     public static class ResCacheExtension
     {
-        public static Font NotoStack(this IClientResourceCache resCache, string variation = "Regular", int size = 10, bool display = false)
+        public static Font NotoStack(this IResourceCache resCache, string variation = "Regular", int size = 10, bool display = false)
         {
             var ds = display ? "Display" : "";
             var sv = variation.StartsWith("Bold", StringComparison.Ordinal) ? "Bold" : "Regular";
@@ -144,7 +144,7 @@ namespace Content.Client.Stylesheets
 
         public override Stylesheet Stylesheet { get; }
 
-        public StyleNano(IClientResourceCache resCache) : base(resCache)
+        public StyleNano(IResourceCache resCache) : base(resCache)
         {
             var notoSans8 = resCache.NotoStack(size: 8);
             var notoSans10 = resCache.NotoStack(size: 10);
index 2c48ce65f50a0e3d97ec0e9564fa27805baf7c2b..3bb4e986af54701366e8682e0bdd851f2081b6b7 100644 (file)
@@ -24,7 +24,7 @@ namespace Content.Client.Stylesheets
 
         public override Stylesheet Stylesheet { get; }
 
-        public StyleSpace(IClientResourceCache resCache) : base(resCache)
+        public StyleSpace(IResourceCache resCache) : base(resCache)
         {
             var notoSans10 = resCache.GetFont
             (
index f817816fc2f5a2a1b5270c565620ce479b4826fd..4c767bd554ecf0e6d138248a22f138fbaa89c2c3 100644 (file)
@@ -7,7 +7,7 @@ namespace Content.Client.Stylesheets
     public sealed class StylesheetManager : IStylesheetManager
     {
         [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
-        [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+        [Dependency] private readonly IResourceCache _resourceCache = default!;
 
         public Stylesheet SheetNano { get; private set; } = default!;
         public Stylesheet SheetSpace { get; private set; } = default!;
index 0f60c4975280159b3f04c4e20452197a3b24d906..59ac435acf10d694edb6801655c29249f9c49517 100644 (file)
@@ -18,7 +18,7 @@ namespace Content.Client.SurveillanceCamera.UI;
 public sealed partial class SurveillanceCameraMonitorWindow : DefaultWindow
 {
     [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
-    [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+    [Dependency] private readonly IResourceCache _resourceCache = default!;
 
     public event Action<string>? CameraSelected;
     public event Action<string>? SubnetOpened;
index ba4f922ddba011e02193d77fd41dae094541bd4f..87abec80bb9e94a876e6058663fadcee543645e1 100644 (file)
@@ -2,8 +2,6 @@ using System.Numerics;
 using Content.Shared.Traits.Assorted;
 using Robust.Shared.Random;
 using Robust.Client.Player;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Timing;
 
 namespace Content.Client.Traits;
@@ -42,7 +40,7 @@ public sealed class ParacusiaSystem : SharedParacusiaSystem
 
     private void OnPlayerDetach(EntityUid uid, ParacusiaComponent component, LocalPlayerDetachedEvent args)
     {
-        component.Stream = _audio.Stop(component.Stream);
+        component.Stream?.Stop();
     }
 
     private void PlayParacusiaSounds(EntityUid uid)
@@ -68,7 +66,7 @@ public sealed class ParacusiaSystem : SharedParacusiaSystem
         var newCoords = Transform(uid).Coordinates.Offset(randomOffset);
 
         // Play the sound
-        paracusia.Stream = _audio.PlayStatic(paracusia.Sounds, uid, newCoords).Value.Entity;
+        paracusia.Stream = _audio.PlayStatic(paracusia.Sounds, uid, newCoords);
     }
 
 }
index 44c92456a1f7d62b9aeff5f3b21bab13b95503d5..1c9156585874dcff87838b23ac63ffc49013d5be 100644 (file)
@@ -1,8 +1,6 @@
 using Content.Shared.Trigger;
 using Robust.Client.Animations;
 using Robust.Client.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.GameObjects;
 
 namespace Content.Client.Trigger;
index f52bd6573e0e460c256b49ace584cffb1bf572d5..6cf7622ea4e8a65038d8069573a28a03a5c34b11 100644 (file)
@@ -19,7 +19,7 @@ namespace Content.Client.UserInterface.Controls.FancyTree;
 [GenerateTypedNameReferences]
 public sealed partial class FancyTree : Control
 {
-    [Dependency] private readonly IClientResourceCache _resCache = default!;
+    [Dependency] private readonly IResourceCache _resCache = default!;
 
     public const string StylePropertyLineWidth = "LineWidth";
     public const string StylePropertyLineColor = "LineColor";
index 7ab855c0eed4395b73d37c3cd6d88eafc236a037..7797a096de30f94a03462a76f6c887c1928a4ffc 100644 (file)
@@ -21,7 +21,7 @@ namespace Content.Client.UserInterface.Systems.Atmos.GasTank
         private readonly Control _contentContainer;
 
 
-        private readonly IClientResourceCache _resourceCache = default!;
+        private readonly IResourceCache _resourceCache = default!;
         private readonly RichTextLabel _lblPressure;
         private readonly FloatSpinBox _spbPressure;
         private readonly RichTextLabel _lblInternals;
@@ -30,7 +30,7 @@ namespace Content.Client.UserInterface.Systems.Atmos.GasTank
         public GasTankWindow(GasTankBoundUserInterface owner)
         {
             TextureButton btnClose;
-            _resourceCache = IoCManager.Resolve<IClientResourceCache>();
+            _resourceCache = IoCManager.Resolve<IResourceCache>();
             _owner = owner;
             var rootContainer = new LayoutContainer {Name = "GasTankRoot"};
             AddChild(rootContainer);
index 659792f967486e15e89eb54431979fa51469e67c..87d4b8072fcc4fcde6748f0513c893152fcb77cd 100644 (file)
@@ -20,7 +20,6 @@ using Robust.Client.UserInterface.Controllers;
 using Robust.Client.UserInterface.Controls;
 using Robust.Client.UserInterface.CustomControls;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Input.Binding;
 using Robust.Shared.Network;
 using Robust.Shared.Player;
@@ -35,7 +34,6 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
     [Dependency] private readonly IPlayerManager _playerManager = default!;
     [Dependency] private readonly IClyde _clyde = default!;
     [Dependency] private readonly IUserInterfaceManager _uiManager = default!;
-    [UISystemDependency] private readonly SharedAudioSystem _audio = default!;
 
     private BwoinkSystem? _bwoinkSystem;
     private MenuButton? GameAHelpButton => UIManager.GetActiveUIWidgetOrNull<GameTopMenuBar>()?.AHelpButton;
@@ -130,7 +128,7 @@ public sealed class AHelpUIController: UIController, IOnSystemChanged<BwoinkSyst
         }
         if (localPlayer.UserId != message.TrueSender)
         {
-            _audio.PlayGlobal("/Audio/Effects/adminhelp.ogg", Filter.Local(), false);
+            SoundSystem.Play("/Audio/Effects/adminhelp.ogg", Filter.Local());
             _clyde.RequestWindowAttention();
         }
 
index a32a36a7a469a54c2124aa82612c253e0c562f32..d19f167587fc2ed2e7daa2b839dabfb88e882b72 100644 (file)
@@ -20,7 +20,7 @@ public sealed class ChannelFilterButton : ContainerButton
     public ChannelFilterButton()
     {
         _chatUIController = UserInterfaceManager.GetUIController<ChatUIController>();
-        var filterTexture = IoCManager.Resolve<IClientResourceCache>()
+        var filterTexture = IoCManager.Resolve<IResourceCache>()
             .GetTexture("/Textures/Interface/Nano/filter.svg.96dpi.png");
 
         // needed for same reason as ChannelSelectorButton
index 79d23a94beeb87cf363fff8b4c32fc16b52454ef..56c0c2863482302ce6631501c1d43e4515f525f8 100644 (file)
@@ -1,9 +1,7 @@
 using Content.Client.UserInterface.Systems.Chat.Controls;
 using Content.Shared.Chat;
 using Content.Shared.Input;
-using Robust.Client.Audio;
 using Robust.Client.AutoGenerated;
-using Robust.Client.GameObjects;
 using Robust.Client.UserInterface;
 using Robust.Client.UserInterface.Controls;
 using Robust.Client.UserInterface.XAML;
@@ -21,7 +19,6 @@ public partial class ChatBox : UIWidget
 #pragma warning restore RA0003
 {
     private readonly ChatUIController _controller;
-    private readonly IEntityManager _entManager;
 
     public bool Main { get; set; }
 
@@ -30,7 +27,6 @@ public partial class ChatBox : UIWidget
     public ChatBox()
     {
         RobustXamlLoader.Load(this);
-        _entManager = IoCManager.Resolve<IEntityManager>();
 
         ChatInput.Input.OnTextEntered += OnTextEntered;
         ChatInput.Input.OnKeyBindDown += OnKeyBindDown;
@@ -56,8 +52,8 @@ public partial class ChatBox : UIWidget
             return;
         }
 
-        if (msg is { Read: false, AudioPath: { } })
-            _entManager.System<AudioSystem>().PlayGlobal(msg.AudioPath, Filter.Local(), false, AudioParams.Default.WithVolume(msg.AudioVolume));
+        if (msg is { Read: false, AudioPath: not null })
+            SoundSystem.Play(msg.AudioPath, Filter.Local(), new AudioParams().WithVolume(msg.AudioVolume));
 
         msg.Read = true;
 
index 2cabe67988953e7d0c3ac7ca0e67c8d0e81c3ea4..4a64b466c3cc15b386eb2b3433ab2485c3f87a99 100644 (file)
@@ -8,12 +8,12 @@ namespace Content.Client.UserInterface.XamlExtensions;
 [PublicAPI]
 public sealed class TexExtension
 {
-    private IClientResourceCache _resourceCache;
+    private IResourceCache _resourceCache;
     public string Path { get; }
 
     public TexExtension(string path)
     {
-        _resourceCache = IoCManager.Resolve<IClientResourceCache>();
+        _resourceCache = IoCManager.Resolve<IResourceCache>();
         Path = path;
     }
 
index 63c706c86b3c5d295477adab9454086cfc71175f..3220f2bdb21f54b660ac3d3919c2fbae6e58e33e 100644 (file)
@@ -3,7 +3,6 @@ using System.Collections.Generic;
 using System.Linq;
 using Content.Shared.Voting;
 using Robust.Client;
-using Robust.Client.Audio;
 using Robust.Client.Console;
 using Robust.Client.GameObjects;
 using Robust.Client.UserInterface;
index 565672ad383d3768e4bbc8831fd3a5ab4dc7ce87..4e4df4a156802bf1db982970b939afa67184a069 100644 (file)
@@ -2,8 +2,6 @@ using Content.Shared.Projectiles;
 using Content.Shared.Weapons.Ranged.Components;
 using Content.Shared.Weapons.Ranged.Systems;
 using Robust.Client.Player;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Physics.Events;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
index 0a487c1b5b4e881eb2726bc92d0d0d0f8c25c873..12af31b8631b6f2492dde2598b4be1114bfc8d6f 100644 (file)
@@ -24,7 +24,7 @@ public sealed class WeatherOverlay : Overlay
     [Dependency] private readonly IGameTiming _timing = default!;
     [Dependency] private readonly IMapManager _mapManager = default!;
     [Dependency] private readonly IPrototypeManager _protoManager = default!;
-    [Dependency] private readonly IClientResourceCache _cache = default!;
+    [Dependency] private readonly IResourceCache _cache = default!;
     private readonly SharedTransformSystem _transform;
     private readonly SpriteSystem _sprite;
     private readonly WeatherSystem _weather;
index bf8aa2a0f753f4b8f9705a1d1fe0c904a33a6f59..e1742f479000484d0aeaff86bc90522ea716a4f7 100644 (file)
@@ -1,10 +1,8 @@
 using System.Numerics;
 using Content.Shared.Weather;
-using Robust.Client.Audio;
 using Robust.Client.GameObjects;
 using Robust.Client.Graphics;
 using Robust.Client.Player;
-using Robust.Shared.Audio;
 using Robust.Shared.GameStates;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
@@ -12,7 +10,6 @@ using Robust.Shared.Physics;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Physics.Systems;
 using Robust.Shared.Player;
-using AudioComponent = Robust.Shared.Audio.Components.AudioComponent;
 
 namespace Content.Client.Weather;
 
@@ -58,18 +55,18 @@ public sealed class WeatherSystem : SharedWeatherSystem
         {
             weather.LastOcclusion = 0f;
             weather.LastAlpha = 0f;
-            weather.Stream = _audio.Stop(weather.Stream);
+            weather.Stream?.Stop();
+            weather.Stream = null;
             return;
         }
 
         if (!Timing.IsFirstTimePredicted || weatherProto.Sound == null)
             return;
 
-        weather.Stream ??= _audio.PlayGlobal(weatherProto.Sound, Filter.Local(), true).Value.Entity;
+        weather.Stream ??= _audio.PlayGlobal(weatherProto.Sound, Filter.Local(), true);
         var volumeMod = MathF.Pow(10, weatherProto.Sound.Params.Volume / 10f);
 
-        var stream = weather.Stream.Value;
-        var comp = Comp<AudioComponent>(stream);
+        var stream = (AudioSystem.PlayingStream) weather.Stream!;
         var alpha = weather.LastAlpha;
         alpha = MathF.Pow(alpha, 2f) * volumeMod;
         // TODO: Lerp this occlusion.
@@ -135,7 +132,7 @@ public sealed class WeatherSystem : SharedWeatherSystem
                 {
                     occlusion = _physics.IntersectRayPenetration(entXform.MapID,
                         new CollisionRay(entPos, sourceRelative.Normalized(), _audio.OcclusionCollisionMask),
-                        sourceRelative.Length(), stream);
+                        sourceRelative.Length(), stream.TrackingEntity);
                 }
             }
         }
@@ -151,8 +148,8 @@ public sealed class WeatherSystem : SharedWeatherSystem
             weather.LastAlpha += (alpha - weather.LastAlpha) * AlphaLerpRate * frameTime;
 
         // Full volume if not on grid
-        comp.Gain = weather.LastAlpha;
-        comp.Occlusion = weather.LastOcclusion;
+        stream.Source.SetVolumeDirect(weather.LastAlpha);
+        stream.Source.SetOcclusion(weather.LastOcclusion);
     }
 
     protected override void EndWeather(EntityUid uid, WeatherComponent component, string proto)
@@ -175,8 +172,9 @@ public sealed class WeatherSystem : SharedWeatherSystem
             return true;
 
         // TODO: Fades (properly)
-        weather.Stream = _audio.Stop(weather.Stream);
-        weather.Stream = _audio.PlayGlobal(weatherProto.Sound, Filter.Local(), true)?.Entity;
+        weather.Stream?.Stop();
+        weather.Stream = null;
+        weather.Stream = _audio.PlayGlobal(weatherProto.Sound, Filter.Local(), true);
         return true;
     }
 
index e1c93aa428be1748abbd5dd9ee414a6fd070631b..7bccc208616c2ac2b94cfffb170c003f33d12328 100644 (file)
@@ -22,7 +22,7 @@ namespace Content.Client.Wires.UI
 {
     public sealed class WiresMenu : BaseWindow
     {
-        [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+        [Dependency] private readonly IResourceCache _resourceCache = default!;
 
         public WiresBoundUserInterface Owner { get; }
 
@@ -299,7 +299,7 @@ namespace Content.Client.Wires.UI
 
         private sealed class WireControl : Control
         {
-            private IClientResourceCache _resourceCache;
+            private IResourceCache _resourceCache;
 
             private const string TextureContact = "/Textures/Interface/WireHacking/contact.svg.96dpi.png";
 
@@ -307,7 +307,7 @@ namespace Content.Client.Wires.UI
             public event Action? ContactsClicked;
 
             public WireControl(WireColor color, WireLetter letter, bool isCut, bool flip, bool mirror, int type,
-                IClientResourceCache resourceCache)
+                IResourceCache resourceCache)
             {
                 _resourceCache = resourceCache;
 
@@ -412,10 +412,10 @@ namespace Content.Client.Wires.UI
                     "/Textures/Interface/WireHacking/wire_2_copper.svg.96dpi.png"
                 };
 
-                private readonly IClientResourceCache _resourceCache;
+                private readonly IResourceCache _resourceCache;
 
                 public WireRender(WireColor color, bool isCut, bool flip, bool mirror, int type,
-                    IClientResourceCache resourceCache)
+                    IResourceCache resourceCache)
                 {
                     _resourceCache = resourceCache;
                     _color = color;
@@ -507,7 +507,7 @@ namespace Content.Client.Wires.UI
                 }
             };
 
-            public StatusLight(StatusLightData data, IClientResourceCache resourceCache)
+            public StatusLight(StatusLightData data, IResourceCache resourceCache)
             {
                 var hsv = Color.ToHsv(data.Color);
                 hsv.Z /= 2;
index 47c0d8497728238a8f6d954666d9711ddbfea535..34692aa082fad3427a679dfa107eb0ca22976a90 100644 (file)
@@ -6,8 +6,6 @@ using Content.Server.Destructible.Thresholds.Triggers;
 using Content.Shared.Damage;
 using Content.Shared.Damage.Prototypes;
 using Content.Shared.FixedPoint;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.GameObjects;
 using Robust.Shared.Prototypes;
 using static Content.IntegrationTests.Tests.Destructible.DestructibleTestPrototypes;
index b9b76cdd5755df693cec95d44a3137c12c229f2a..a11191a51ea3494d5ffb2a3ccd4bd502c603d21e 100644 (file)
@@ -15,7 +15,7 @@ namespace Content.IntegrationTests.Tests
             await using var pair = await PoolManager.GetServerClient(new PoolSettings { Connected = true });
             var client = pair.Client;
             var prototypeManager = client.ResolveDependency<IPrototypeManager>();
-            var resourceCache = client.ResolveDependency<IClientResourceCache>();
+            var resourceCache = client.ResolveDependency<IResourceCache>();
 
             await client.WaitAssertion(() =>
             {
index f59952afecdc874090533021c395dec338fb7620..25171e1ea2ed19f05a0029689570c5ab10d6a493 100644 (file)
@@ -619,9 +619,6 @@ public abstract partial class InteractionTest
         {
             foreach (var (proto, quantity) in expected.Entities)
             {
-                if (proto == "Audio")
-                    continue;
-
                 if (quantity < 0 && failOnExcess)
                     Assert.Fail($"Unexpected entity/stack: {proto}, quantity: {-quantity}");
 
index f863595f9ac39f34cead7983b02928c17c1aa756..ffcd140a6eda3b7d9b7221519ad7a883e88495e7 100644 (file)
@@ -4,7 +4,6 @@ using System.IO;
 using Content.Shared.Decals;
 using Robust.Client.ResourceManagement;
 using Robust.Client.Utility;
-using Robust.Shared.ContentPack;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
@@ -17,7 +16,7 @@ namespace Content.MapRenderer.Painters;
 
 public sealed class DecalPainter
 {
-    private readonly IResourceManager _resManager;
+    private readonly IResourceCache _cResourceCache;
 
     private readonly IPrototypeManager _sPrototypeManager;
 
@@ -25,7 +24,7 @@ public sealed class DecalPainter
 
     public DecalPainter(ClientIntegrationInstance client, ServerIntegrationInstance server)
     {
-        _resManager = client.ResolveDependency<IResourceManager>();
+        _cResourceCache = client.ResolveDependency<IResourceCache>();
         _sPrototypeManager = server.ResolveDependency<IPrototypeManager>();
     }
 
@@ -64,7 +63,7 @@ public sealed class DecalPainter
         Stream stream;
         if (sprite is SpriteSpecifier.Texture texture)
         {
-            stream = _resManager.ContentFileRead(texture.TexturePath);
+            stream = _cResourceCache.ContentFileRead(texture.TexturePath);
         }
         else if (sprite is SpriteSpecifier.Rsi rsi)
         {
@@ -74,7 +73,7 @@ public sealed class DecalPainter
                 path = $"/Textures/{path}";
             }
 
-            stream = _resManager.ContentFileRead(path);
+            stream = _cResourceCache.ContentFileRead(path);
         }
         else
         {
index de6b98711f2e9d651c4d6cd47143243b92f73017..79f2ed76796cb9fff0aa5a60e23aa712e10b7987 100644 (file)
@@ -3,7 +3,6 @@ using System.Collections.Generic;
 using Robust.Client.GameObjects;
 using Robust.Client.Graphics;
 using Robust.Client.ResourceManagement;
-using Robust.Shared.ContentPack;
 using Robust.Shared.GameObjects;
 using Robust.Shared.Timing;
 using SixLabors.ImageSharp;
@@ -15,7 +14,7 @@ namespace Content.MapRenderer.Painters;
 
 public sealed class EntityPainter
 {
-    private readonly IResourceManager _resManager;
+    private readonly IResourceCache _cResourceCache;
 
     private readonly Dictionary<(string path, string state), Image> _images;
     private readonly Image _errorImage;
@@ -24,12 +23,12 @@ public sealed class EntityPainter
 
     public EntityPainter(ClientIntegrationInstance client, ServerIntegrationInstance server)
     {
-        _resManager = client.ResolveDependency<IResourceManager>();
+        _cResourceCache = client.ResolveDependency<IResourceCache>();
 
         _sEntityManager = server.ResolveDependency<IEntityManager>();
 
         _images = new Dictionary<(string path, string state), Image>();
-        _errorImage = Image.Load<Rgba32>(_resManager.ContentFileRead("/Textures/error.rsi/error.png"));
+        _errorImage = Image.Load<Rgba32>(_cResourceCache.ContentFileRead("/Textures/error.rsi/error.png"));
     }
 
     public void Run(Image canvas, List<EntityData> entities)
@@ -82,7 +81,7 @@ public sealed class EntityPainter
 
                 if (!_images.TryGetValue(key, out image!))
                 {
-                    var stream = _resManager.ContentFileRead($"{rsi.Path}/{state.StateId}.png");
+                    var stream = _cResourceCache.ContentFileRead($"{rsi.Path}/{state.StateId}.png");
                     image = Image.Load<Rgba32>(stream);
 
                     _images[key] = image;
index cac0f960c460e0fa80ad4640ed4ce1a357273a87..461bad9f21fc4df310f13f11f8a2878d6a325cc1 100644 (file)
@@ -3,7 +3,6 @@ using System.Collections.Generic;
 using System.Linq;
 using Robust.Client.Graphics;
 using Robust.Client.ResourceManagement;
-using Robust.Shared.ContentPack;
 using Robust.Shared.GameObjects;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
@@ -20,12 +19,12 @@ namespace Content.MapRenderer.Painters
         public const int TileImageSize = EyeManager.PixelsPerMeter;
 
         private readonly ITileDefinitionManager _sTileDefinitionManager;
-        private readonly IResourceManager _resManager;
+        private readonly IResourceCache _cResourceCache;
 
         public TilePainter(ClientIntegrationInstance client, ServerIntegrationInstance server)
         {
             _sTileDefinitionManager = server.ResolveDependency<ITileDefinitionManager>();
-            _resManager = client.ResolveDependency<IResourceManager>();
+            _cResourceCache = client.ResolveDependency<IResourceCache>();
         }
 
         public void Run(Image gridCanvas, EntityUid gridUid, MapGridComponent grid)
@@ -38,7 +37,7 @@ namespace Content.MapRenderer.Painters
             var yOffset = -bounds.Bottom;
             var tileSize = grid.TileSize * TileImageSize;
 
-            var images = GetTileImages(_sTileDefinitionManager, _resManager, tileSize);
+            var images = GetTileImages(_sTileDefinitionManager, _cResourceCache, tileSize);
             var i = 0;
 
             grid.GetAllTiles().AsParallel().ForAll(tile =>
@@ -62,7 +61,7 @@ namespace Content.MapRenderer.Painters
 
         private Dictionary<string, List<Image>> GetTileImages(
             ITileDefinitionManager tileDefinitionManager,
-            IResourceManager resManager,
+            IResourceCache resourceCache,
             int tileSize)
         {
             var stopwatch = new Stopwatch();
@@ -79,7 +78,7 @@ namespace Content.MapRenderer.Painters
 
                 images[path] = new List<Image>(definition.Variants);
 
-                using var stream = resManager.ContentFileRead(path);
+                using var stream = resourceCache.ContentFileRead(path);
                 Image tileSheet = Image.Load<Rgba32>(stream);
 
                 if (tileSheet.Width != tileSize * definition.Variants || tileSheet.Height != tileSize)
index fc75a93acbcbed86545c6627ee86aec18f509297..5792c1bc018e248f4cd82cf0db915deb55fcdad1 100644 (file)
@@ -27,7 +27,7 @@ public sealed class ReplayMainScreen : State
     [Dependency] private readonly IComponentFactory _factory = default!;
     [Dependency] private readonly IConfigurationManager _cfg = default!;
     [Dependency] private readonly IReplayLoadManager _loadMan = default!;
-    [Dependency] private readonly IClientResourceCache _resourceCache = default!;
+    [Dependency] private readonly IResourceCache _resourceCache = default!;
     [Dependency] private readonly IGameController _controllerProxy = default!;
     [Dependency] private readonly IClientRobustSerializer _serializer = default!;
     [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
index 824c8f423b659d79edba5f7d61382bc5fc323e5a..8ab7f7412d4db3f1f7c2004da246114abb116f77 100644 (file)
@@ -11,7 +11,7 @@ namespace Content.Replay.Menu;
 [GenerateTypedNameReferences]
 public sealed partial class ReplayMainMenuControl : Control
 {
-    public ReplayMainMenuControl(IClientResourceCache resCache)
+    public ReplayMainMenuControl(IResourceCache resCache)
     {
         RobustXamlLoader.Load(this);
 
index 41bb84ab6b22223470cda583869879d9710cc6ec..147ac70a6d589f0d52863c1d6e6ee0f5ba8dd083 100644 (file)
@@ -8,8 +8,6 @@ using Content.Shared.DoAfter;
 using Content.Shared.Interaction;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Player;
 using static Content.Shared.Access.Components.AccessOverriderComponent;
index cc31071fe8cb69de28c7845111cd6f8a17d82e92..feabaa2aad6e5da1e7421cb21d7944573563b244 100644 (file)
@@ -26,7 +26,6 @@ using Content.Shared.Throwing;
 using Robust.Server.GameObjects;
 using Robust.Server.Player;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Enums;
 using Robust.Shared.Network;
@@ -40,6 +39,7 @@ namespace Content.Server.Administration.Systems
         [Dependency] private readonly IChatManager _chat = default!;
         [Dependency] private readonly IConfigurationManager _config = default!;
         [Dependency] private readonly IPlayerManager _playerManager = default!;
+        [Dependency] private readonly AudioSystem _audio = default!;
         [Dependency] private readonly HandsSystem _hands = default!;
         [Dependency] private readonly SharedJobSystem _jobs = default!;
         [Dependency] private readonly InventorySystem _inventory = default!;
@@ -49,7 +49,6 @@ namespace Content.Server.Administration.Systems
         [Dependency] private readonly PlayTimeTrackingManager _playTime = default!;
         [Dependency] private readonly SharedRoleSystem _role = default!;
         [Dependency] private readonly GameTicker _gameTicker = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
         [Dependency] private readonly StationRecordsSystem _stationRecords = default!;
         [Dependency] private readonly TransformSystem _transform = default!;
 
@@ -341,7 +340,7 @@ namespace Content.Server.Administration.Systems
                     _popup.PopupCoordinates(Loc.GetString("admin-erase-popup", ("user", name)), coordinates, PopupType.LargeCaution);
                     var filter = Filter.Pvs(coordinates, 1, EntityManager, _playerManager);
                     var audioParams = new AudioParams().WithVolume(3);
-                    _audio.PlayStatic("/Audio/Effects/pop_high.ogg", filter, coordinates, true, audioParams);
+                    _audio.Play("/Audio/Effects/pop_high.ogg", filter, coordinates, true, audioParams);
                 }
 
                 foreach (var item in _inventory.GetHandOrInventoryEntities(entity.Value))
index b2b63e618e61e9b6aae2799b6ddb0776c5cc44de..66e09d34e0f36c6af8df8fee3728ba8b7652873a 100644 (file)
@@ -3,7 +3,6 @@ using Content.Server.Chat.Systems;
 using Content.Server.Station.Systems;
 using Content.Shared.CCVar;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Prototypes;
 
@@ -11,11 +10,10 @@ namespace Content.Server.AlertLevel;
 
 public sealed class AlertLevelSystem : EntitySystem
 {
-    [Dependency] private readonly IConfigurationManager _cfg = default!;
     [Dependency] private readonly IPrototypeManager _prototypeManager = default!;
     [Dependency] private readonly ChatSystem _chatSystem = default!;
-    [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly StationSystem _stationSystem = default!;
+    [Dependency] private readonly IConfigurationManager _cfg = default!;
 
     // Until stations are a prototype, this is how it's going to have to be.
     public const string DefaultAlertLevelSet = "stationAlerts";
@@ -176,7 +174,7 @@ public sealed class AlertLevelSystem : EntitySystem
             if (detail.Sound != null)
             {
                 var filter = _stationSystem.GetInOwningStation(station);
-                _audio.PlayGlobal(detail.Sound.GetSound(), filter, true, detail.Sound.Params);
+                SoundSystem.Play(detail.Sound.GetSound(), filter, detail.Sound.Params);
             }
             else
             {
index c7704ecf76cefd0122720c311ce6d4bc2c2f2793..44140193d2a3f01cdb25134cf6296ed1dc56f45d 100644 (file)
@@ -15,7 +15,6 @@ using Content.Shared.Popups;
 using Robust.Server.Containers;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Timing;
 
index a75c092e2ead5746ac40b3b2215b9c3921527570..54a379f693bf4780a3c38cf8c0b54b948518f3de 100644 (file)
@@ -6,8 +6,6 @@ using Content.Server.Tools;
 using Content.Shared.Database;
 using Content.Shared.Hands.Components;
 using Content.Shared.Interaction;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 
 namespace Content.Server.Ame.EntitySystems;
index 35c3bab01dd8ab3aadcb866fbdd97121e2ccfb94..5189adb031ddbdd945cafe841cae98a8ce17307f 100644 (file)
@@ -5,7 +5,6 @@ using Content.Shared.Actions.Events;
 using Content.Shared.Nutrition.Components;
 using Content.Shared.Nutrition.EntitySystems;
 using Content.Shared.Storage;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
index 769558a7ad13f204bb7b47bdb9c3ae32044cd1de..f1b147ac802727d0eac3dd5170052797321615fd 100644 (file)
@@ -81,7 +81,7 @@ public sealed partial class AnomalySystem
 
         var generating = EnsureComp<GeneratingAnomalyGeneratorComponent>(uid);
         generating.EndTime = Timing.CurTime + component.GenerationLength;
-        generating.AudioStream = Audio.PlayPvs(component.GeneratingSound, uid, AudioParams.Default.WithLoop(true))?.Entity;
+        generating.AudioStream = Audio.PlayPvs(component.GeneratingSound, uid, AudioParams.Default.WithLoop(true));
         component.CooldownEndTime = Timing.CurTime + component.CooldownLength;
         UpdateGeneratorUi(uid, component);
     }
@@ -174,8 +174,7 @@ public sealed partial class AnomalySystem
         {
             if (Timing.CurTime < active.EndTime)
                 continue;
-
-            active.AudioStream = _audio.Stop(active.AudioStream);
+            active.AudioStream?.Stop();
             OnGeneratingFinished(ent, gen);
         }
     }
index bb7a7304d9bb450b528cf40b0a48ba64fa5e9fbc..5f6220f386f4de10da980f59f8cd2726cd099e71 100644 (file)
@@ -9,8 +9,6 @@ using Content.Shared.Anomaly;
 using Content.Shared.Anomaly.Components;
 using Content.Shared.DoAfter;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Physics.Events;
 using Robust.Shared.Prototypes;
@@ -33,7 +31,6 @@ public sealed partial class AnomalySystem : SharedAnomalySystem
     [Dependency] private readonly SharedPointLightSystem _pointLight = default!;
     [Dependency] private readonly StationSystem _station = default!;
     [Dependency] private readonly RadioSystem _radio = default!;
-    [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly UserInterfaceSystem _ui = default!;
 
     public const float MinParticleVariation = 0.8f;
index 4233bfd7e1e57e886a7cb9a0ee70b3b15b91e272..d768f905cea67baf00d02fd1fc56212e1c84362d 100644 (file)
@@ -13,5 +13,5 @@ public sealed partial class GeneratingAnomalyGeneratorComponent : Component
     [DataField("endTime", customTypeSerializer: typeof(TimeOffsetSerializer))]
     public TimeSpan EndTime = TimeSpan.Zero;
 
-    public EntityUid? AudioStream;
+    public IPlayingAudioStream? AudioStream;
 }
index 603396e31ac54dc041c0b01cfba82fd5f27c5255..964a42234d3a0dd0f1ba921b2ecbc64e302e13aa 100644 (file)
@@ -4,8 +4,6 @@ using Content.Server.Anomaly.Components;
 using Content.Shared.Anomaly.Components;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Teleportation.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
 
 namespace Content.Server.Anomaly.Effects;
index 487d20f43f01a91a1f211f31e14354a917f9e575..c87dcf4eaeb95083e565c5f2282dd465cb1a9687 100644 (file)
@@ -6,7 +6,6 @@ using Content.Shared.Chemistry.EntitySystems;
 using Robust.Shared.Prototypes;
 using Content.Shared.Sprite;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Anomaly.Effects;
 
@@ -76,7 +75,7 @@ public sealed class ReagentProducerAnomalySystem : EntitySystem
             if (anomaly.Severity >= 0.97) reagentProducingAmount *= component.SupercriticalReagentProducingModifier;
 
             newSol.AddReagent(component.ProducingReagent, reagentProducingAmount);
-            _solutionContainer.TryAddSolution(uid, producerSol, newSol); //TO DO - the container is not fully filled.
+            _solutionContainer.TryAddSolution(uid, producerSol, newSol); //TO DO - the container is not fully filled. 
 
             component.AccumulatedFrametime = 0;
 
index b3b8a375088e5b5c35fa5635150f851e153a1e92..737b723d390abcfe8bf9321e39ebd2c1b748e9fa 100644 (file)
@@ -21,7 +21,6 @@ using Content.Shared.Mobs.Components;
 using Content.Server.Station.Systems;
 using Content.Server.Shuttles.Systems;
 using Content.Shared.Mobs;
-using Robust.Server.Audio;
 using Robust.Server.Containers;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
index eae9b94964770c4b9ca6f1048d5e9c90aee1f080..5e4d7d5ec6a5b70a3309a71bd5c9873639285327 100644 (file)
@@ -3,7 +3,6 @@ using Content.Server.UserInterface;
 using static Content.Shared.Arcade.SharedSpaceVillainArcadeComponent;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
 
 namespace Content.Server.Arcade.SpaceVillain;
index ae4c15f2db3ac9d81b801c7cb0a066df78785f1c..18dc32282b658021527f42fdbd8023b27ff2b1ea 100644 (file)
@@ -1,7 +1,6 @@
 using static Content.Shared.Arcade.SharedSpaceVillainArcadeComponent;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
 
 namespace Content.Server.Arcade.SpaceVillain;
index 2d6b073e9dfe90ef3c8a371ffbd7366ca3e496aa..a649e57b45db4b48b06a7007a248e776f3c9f29e 100644 (file)
@@ -30,8 +30,8 @@ namespace Content.Server.Atmos.Components
 
         // Cancel toggles sounds if we re-toggle again.
 
-        public EntityUid? ConnectStream;
-        public EntityUid? DisconnectStream;
+        public IPlayingAudioStream? ConnectStream;
+        public IPlayingAudioStream? DisconnectStream;
 
         [DataField("air"), ViewVariables(VVAccess.ReadWrite)]
         public GasMixture Air { get; set; } = new();
index 989fed945f50d850810a0ab1cb1b5dd5506041ce..020684aa3b9757a53da91383033b9548c5c4c1f8 100644 (file)
@@ -101,7 +101,8 @@ namespace Content.Server.Atmos.EntitySystems
                 if(_spaceWindSoundCooldown == 0 && !string.IsNullOrEmpty(SpaceWindSound))
                 {
                     var coordinates = tile.GridIndices.ToEntityCoordinates(tile.GridIndex, _mapManager);
-                    _audio.PlayPvs(SpaceWindSound, coordinates, AudioParams.Default.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)));
                 }
             }
 
index 5b3d869229cdc787d1baa46d74fc35e7f16c09b5..1b44f6e81938cd0ae5323325b25baa584ed187a9 100644 (file)
@@ -85,7 +85,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.
-                _audio.PlayPvs(HotspotSound, coordinates, AudioParams.Default.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)
index 19855a71e56439fea29207fb64a4ff2aa91aa19c..d8364b652b83a3068843013aa39d0678dd1227f3 100644 (file)
@@ -7,8 +7,6 @@ using Content.Shared.Atmos.EntitySystems;
 using Content.Shared.Maps;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
 using Robust.Shared.Physics.Systems;
@@ -30,7 +28,6 @@ public sealed partial class AtmosphereSystem : SharedAtmosphereSystem
     [Dependency] private readonly SharedContainerSystem _containers = default!;
     [Dependency] private readonly SharedPhysicsSystem _physics = default!;
     [Dependency] private readonly GasTileOverlaySystem _gasTileOverlaySystem = default!;
-    [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly TransformSystem _transformSystem = default!;
     [Dependency] private readonly TileSystem _tile = default!;
 
index f2085bc673aaa319aceeed5764c0ad23cef4b9fe..17715435b2fea46f3e12c11fa96eb91b1914dbf7 100644 (file)
@@ -13,7 +13,6 @@ using Content.Shared.Verbs;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Physics.Systems;
 using Robust.Shared.Player;
@@ -240,8 +239,10 @@ namespace Content.Server.Atmos.EntitySystems
             if (!component.IsConnected)
                 return;
 
-            component.ConnectStream = _audioSys.Stop(component.ConnectStream);
-            component.ConnectStream = _audioSys.PlayPvs(component.ConnectSound, component.Owner)?.Entity;
+            component.ConnectStream?.Stop();
+
+            if (component.ConnectSound != null)
+                component.ConnectStream = _audioSys.PlayPvs(component.ConnectSound, owner);
 
             UpdateUserInterface(ent);
         }
@@ -258,8 +259,10 @@ namespace Content.Server.Atmos.EntitySystems
             _actions.SetToggled(component.ToggleActionEntity, false);
 
             _internals.DisconnectTank(internals);
-            component.DisconnectStream = _audioSys.Stop(component.DisconnectStream);
-            component.DisconnectStream = _audioSys.PlayPvs(component.DisconnectSound, component.Owner)?.Entity;
+            component.DisconnectStream?.Stop();
+
+            if (component.DisconnectSound != null)
+                component.DisconnectStream = _audioSys.PlayPvs(component.DisconnectSound, owner);
 
             UpdateUserInterface(ent);
         }
@@ -319,7 +322,7 @@ namespace Content.Server.Atmos.EntitySystems
                     if(environment != null)
                         _atmosphereSystem.Merge(environment, component.Air);
 
-                    _audioSys.PlayPvs(component.RuptureSound, Transform(component.Owner).Coordinates, AudioParams.Default.WithVariation(0.125f));
+                    _audioSys.Play(component.RuptureSound, Filter.Pvs(owner), Transform(owner).Coordinates, true, AudioParams.Default.WithVariation(0.125f));
 
                     QueueDel(owner);
                     return;
index 27e64a9956d8a156b31eff049f6872d574218cea..b674f864426574db2735bb1ea36a2f0fd58708c4 100644 (file)
@@ -7,7 +7,6 @@ using Content.Server.DeviceNetwork.Systems;
 using Content.Server.Power.Components;
 using Content.Shared.Atmos.Monitor;
 using Content.Shared.Tag;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
 using Robust.Shared.Utility;
index 934ce8a7a47d418187a460038e55905dee39e98d..914e732991127f51cd2f8859477b87299cbca04e 100644 (file)
@@ -8,7 +8,6 @@ using Content.Shared.Examine;
 using Content.Shared.Interaction;
 using JetBrains.Annotations;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Atmos.Piping.Binary.EntitySystems
@@ -18,7 +17,6 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
     {
         [Dependency] private readonly SharedAmbientSoundSystem _ambientSoundSystem = default!;
         [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
         [Dependency] private readonly NodeContainerSystem _nodeContainer = default!;
 
         public override void Initialize()
@@ -37,11 +35,10 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
                 return;
 
             if (Loc.TryGetString("gas-valve-system-examined", out var str,
-                    ("statusColor", valve.Open ? "green" : "orange"),
-                    ("open", valve.Open)))
-            {
+                        ("statusColor", valve.Open ? "green" : "orange"),
+                        ("open", valve.Open)
+            ))
                 args.PushMarkup(str);
-            }
         }
 
         private void OnStartup(EntityUid uid, GasValveComponent component, ComponentStartup args)
@@ -53,7 +50,7 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
         private void OnActivate(EntityUid uid, GasValveComponent component, ActivateInWorldEvent args)
         {
             Toggle(uid, component);
-            _audio.PlayPvs(component.ValveSound, uid, AudioParams.Default.WithVariation(0.25f));
+            SoundSystem.Play(component.ValveSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.25f));
         }
 
         public void Set(EntityUid uid, GasValveComponent component, bool value)
index 1ec1bdb1c17733e1ab9404b2d306928db3cdf4b2..14a1e5e456baff2abaf6f610add0ea2e211d8f9e 100644 (file)
@@ -16,8 +16,6 @@ using Content.Shared.Hands.EntitySystems;
 using Content.Shared.Interaction;
 using Content.Shared.Lock;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Player;
 
index 1c5625b0b832b79732300b5fe6184f860e19a1d0..b1e7dcb1878d6a5c9adca344f2b7fa0b3fbea0c2 100644 (file)
@@ -1,41 +1,8 @@
-using Content.Server.GameTicking.Events;
 using Content.Shared.Audio;
-using Robust.Server.Audio;
-using Robust.Shared.Audio;
-using Robust.Shared.Prototypes;
 
 namespace Content.Server.Audio;
 
 public sealed class ContentAudioSystem : SharedContentAudioSystem
 {
-    [Dependency] private readonly AudioSystem _serverAudio = default!;
-    [Dependency] private readonly IPrototypeManager _protoManager = default!;
 
-    public override void Initialize()
-    {
-        base.Initialize();
-        SubscribeLocalEvent<RoundStartingEvent>(OnRoundStart);
-        _protoManager.PrototypesReloaded += OnProtoReload;
-    }
-
-    private void OnProtoReload(PrototypesReloadedEventArgs obj)
-    {
-        if (!obj.ByType.ContainsKey(typeof(AudioPresetPrototype)))
-            return;
-
-        _serverAudio.ReloadPresets();
-    }
-
-    public override void Shutdown()
-    {
-        base.Shutdown();
-        _protoManager.PrototypesReloaded -= OnProtoReload;
-    }
-
-    private void OnRoundStart(RoundStartingEvent ev)
-    {
-        // On cleanup all entities get purged so need to ensure audio presets are still loaded
-        // yeah it's whacky af.
-        _serverAudio.ReloadPresets();
-    }
 }
index 33f2f252d90dd31180c77772d763de1d722d8b93..a9f994ed5609d1065006e89721f833a8a937a010 100644 (file)
@@ -3,8 +3,6 @@ using Content.Server.Beam.Components;
 using Content.Shared.Beam;
 using Content.Shared.Beam.Components;
 using Content.Shared.Physics;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Physics;
 using Robust.Shared.Physics.Collision.Shapes;
index 4a6874bcccdd9980bfdfa48d446cacca73908e4f..17fe4d5effb4d51e7b84c02702aedf24577cb1f3 100644 (file)
@@ -13,8 +13,6 @@ using Content.Shared.Slippery;
 using Content.Shared.StatusEffect;
 using Content.Shared.Stunnable;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
index 5c153bb46452485ee51452c68ee84382ac5c8ef2..b3b41e2f32eca0b99a78e0615dd9dccdb91de685 100644 (file)
@@ -15,7 +15,6 @@ using Content.Shared.Popups;
 using Content.Shared.Timing;
 using Content.Shared.Verbs;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
 
@@ -30,7 +29,6 @@ namespace Content.Server.Bible
         [Dependency] private readonly MobStateSystem _mobStateSystem = default!;
         [Dependency] private readonly PopupSystem _popupSystem = default!;
         [Dependency] private readonly SharedActionsSystem _actionsSystem = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
         [Dependency] private readonly UseDelaySystem _delay = default!;
 
         public override void Initialize()
@@ -82,8 +80,8 @@ namespace Content.Server.Bible
                     summonableComp.Summon = null;
                 }
                 summonableComp.AlreadySummoned = false;
-                _popupSystem.PopupEntity(Loc.GetString("bible-summon-respawn-ready", ("book", summonableComp.Owner)), summonableComp.Owner, PopupType.Medium);
-                _audio.PlayPvs("/Audio/Effects/radpulse9.ogg", summonableComp.Owner, AudioParams.Default.WithVolume(-4f));
+                _popupSystem.PopupEntity(Loc.GetString("bible-summon-respawn-ready", ("book", uid)), uid, PopupType.Medium);
+                SoundSystem.Play("/Audio/Effects/radpulse9.ogg", Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-4f));
                 // Clean up the accumulator and respawn tracking component
                 summonableComp.Accumulator = 0;
                 _remQueue.Enqueue(uid);
@@ -109,7 +107,7 @@ namespace Content.Server.Bible
             {
                 _popupSystem.PopupEntity(Loc.GetString("bible-sizzle"), args.User, args.User);
 
-                _audio.PlayPvs(component.SizzleSoundPath, args.User);
+                SoundSystem.Play(component.SizzleSoundPath.GetSound(), Filter.Pvs(args.User), args.User);
                 _damageableSystem.TryChangeDamage(args.User, component.DamageOnUntrainedUse, true, origin: uid);
                 _delay.BeginDelay(uid, delay);
 
@@ -127,7 +125,7 @@ namespace Content.Server.Bible
                     var selfFailMessage = Loc.GetString(component.LocPrefix + "-heal-fail-self", ("target", Identity.Entity(args.Target.Value, EntityManager)),("bible", uid));
                     _popupSystem.PopupEntity(selfFailMessage, args.User, args.User, PopupType.MediumCaution);
 
-                    _audio.PlayPvs("/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, origin: uid);
                     _delay.BeginDelay(uid, delay);
                     return;
@@ -151,7 +149,7 @@ namespace Content.Server.Bible
 
                 var selfMessage = Loc.GetString(component.LocPrefix + "-heal-success-self", ("target", Identity.Entity(args.Target.Value, EntityManager)),("bible", uid));
                 _popupSystem.PopupEntity(selfMessage, args.User, args.User, PopupType.Large);
-                _audio.PlayPvs(component.HealSoundPath, args.User);
+                SoundSystem.Play(component.HealSoundPath.GetSound(), Filter.Pvs(args.Target.Value), args.User);
                 _delay.BeginDelay(uid, delay);
             }
         }
index b48438e8a43bbc5e180e7c2eb0b46670465f27ea..39403288e95fdf6f16b5f9bff153a1a5b23b8312 100644 (file)
@@ -20,7 +20,6 @@ using Robust.Server.GameObjects;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 using Content.Shared.Speech.EntitySystems;
-using Robust.Server.Audio;
 
 namespace Content.Server.Body.Systems;
 
index 763e53de00b49a57f5040b93f8a95253b0b5db62..242b02d78c1059239db5ab611ea6db4d643dc5dc 100644 (file)
@@ -15,7 +15,6 @@ using Robust.Shared.Player;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
 using System.Numerics;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Body.Systems;
 
@@ -130,7 +129,7 @@ public sealed class BodySystem : SharedBodySystem
         var filter = Filter.Pvs(bodyId, entityManager: EntityManager);
         var audio = AudioParams.Default.WithVariation(0.025f);
 
-        _audio.PlayStatic(body.GibSound, filter, coordinates, true, audio);
+        _audio.Play(body.GibSound, filter, coordinates, true, audio);
 
         foreach (var entity in gibs)
         {
index c9469efb0610624d038c589cd8e56b68787c732f..9991edd230e6dad754837a55d78c922bb03d91f6 100644 (file)
@@ -19,7 +19,6 @@ using Content.Shared.Random;
 using Content.Shared.Tag;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
index 83445d2ae4e21ca05879c220cbe736f93818d437..df9743a21a62edfaddf655d913068c3a505ff6ad 100644 (file)
@@ -10,8 +10,6 @@ using Content.Shared.Stealth;
 using Content.Shared.Stealth.Components;
 using Content.Shared.Storage.Components;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Player;
 using Robust.Shared.Timing;
index 51cfc9791cb2a6d257d7478f14b4f059f1ae6a62..32b63f7105b328189d35dc8a4f5ab7b292dd904d 100644 (file)
@@ -13,8 +13,6 @@ using Content.Shared.Containers.ItemSlots;
 using Content.Shared.Mobs.Components;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Map;
 using Robust.Shared.Prototypes;
index f01be1fc715fac17ba908f9aeb627db36d0ca4d8..b115e658bb2e77bdf978ae84956d50dd7dd7accf 100644 (file)
@@ -4,7 +4,6 @@ using Content.Shared.CartridgeLoader;
 using Content.Shared.CartridgeLoader.Cartridges;
 using Content.Shared.Popups;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
 
index 8c4cfc76c016b0a3f2b194fde61976be8e37ba1a..3315f61c2fb597b79e200fcc1cc6b67e0a708788 100644 (file)
@@ -22,7 +22,6 @@ using Content.Shared.Radio;
 using Robust.Server.GameObjects;
 using Robust.Server.Player;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Console;
 using Robust.Shared.Network;
@@ -308,7 +307,7 @@ public sealed partial class ChatSystem : SharedChatSystem
         _chatManager.ChatMessageToAll(ChatChannel.Radio, message, wrappedMessage, default, false, true, colorOverride);
         if (playSound)
         {
-            _audio.PlayGlobal(announcementSound?.GetSound() ?? DefaultAnnouncementSound, Filter.Broadcast(), true, AudioParams.Default.WithVolume(-2f));
+            SoundSystem.Play(announcementSound?.GetSound() ?? DefaultAnnouncementSound, Filter.Broadcast(), AudioParams.Default.WithVolume(-2f));
         }
         _adminLogger.Add(LogType.Chat, LogImpact.Low, $"Global station announcement from {sender}: {message}");
     }
@@ -346,7 +345,7 @@ public sealed partial class ChatSystem : SharedChatSystem
 
         if (playDefaultSound)
         {
-            _audio.PlayGlobal(announcementSound?.GetSound() ?? DefaultAnnouncementSound, filter, true, AudioParams.Default.WithVolume(-2f));
+            SoundSystem.Play(announcementSound?.GetSound() ?? DefaultAnnouncementSound, filter, AudioParams.Default.WithVolume(-2f));
         }
 
         _adminLogger.Add(LogType.Chat, LogImpact.Low, $"Station Announcement on {station} from {sender}: {message}");
index 07ac01fab69bff0cf6a65e9fc40c4af140a35e87..a831165e688eecea6c26bd77b9d9b7b147c4e8a9 100644 (file)
@@ -14,7 +14,6 @@ using Content.Shared.Database;
 using Content.Shared.FixedPoint;
 using Content.Shared.Storage;
 using JetBrains.Annotations;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
 using Robust.Shared.Containers;
index 759d403acee0ed3b54efbfedddfe4711400b5147..fc4ea0a0b2a13ed726827e2978031599fc831e0e 100644 (file)
@@ -7,8 +7,6 @@ using Content.Shared.Chemistry;
 using Content.Shared.Chemistry.EntitySystems;
 using Content.Shared.DoAfter;
 using Content.Shared.Mobs.Systems;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Chemistry.EntitySystems;
 
index 3768ee1051b9e767e3df2fd1936c73ac583ae9eb..daa2ac80b7de14cca7fbfb7e1109d665d622c098 100644 (file)
@@ -10,7 +10,6 @@ using Content.Shared.Database;
 using Content.Shared.Emag.Components;
 using Content.Shared.Emag.Systems;
 using JetBrains.Annotations;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
 using Robust.Shared.Containers;
index fc807069f78ebbf3792e672b5f08cfd3b802bf63..291a654422ebfe0e1d1f667856e505643c3b57aa 100644 (file)
@@ -8,7 +8,6 @@ using Content.Shared.FixedPoint;
 using Content.Shared.Maps;
 using JetBrains.Annotations;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom.Prototype;
@@ -73,8 +72,7 @@ namespace Content.Server.Chemistry.ReactionEffects
             var smoke = args.EntityManager.System<SmokeSystem>();
             smoke.StartSmoke(ent, splitSolution, _duration, spreadAmount);
 
-            var audio = args.EntityManager.System<SharedAudioSystem>();
-            audio.PlayPvs(_sound, args.SolutionEntity, AudioHelpers.WithVariation(0.125f));
+            args.EntityManager.System<SharedAudioSystem>().PlayPvs(_sound, args.SolutionEntity, AudioHelpers.WithVariation(0.125f));
         }
     }
 }
index 8bfd6250efce3798c01760e625ac7eb9d5d0db13..6d34e0e6f73e68d5b063cae1507f0877271edf3d 100644 (file)
@@ -29,8 +29,6 @@ using Content.Shared.Roles.Jobs;
 using Robust.Server.Containers;
 using Robust.Server.GameObjects;
 using Robust.Server.Player;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Containers;
 using Robust.Shared.Physics.Components;
index c170886a803a0425e7bd2e801f41f25fe8688381..9ce50137bf6882587039ca136c56326c8b2efde0 100644 (file)
@@ -14,8 +14,6 @@ using Content.Server.Emoting.Systems;
 using Content.Server.Speech.EntitySystems;
 using Content.Shared.Cluwne;
 using Content.Shared.Interaction.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Cluwne;
 
index 50b705ddfeb1c63866bcbc39590009e4d51e6f11..9fa3c43ae47b8081e3afb1d44421809494b4af9d 100644 (file)
@@ -1,7 +1,6 @@
 using Content.Shared.Construction;
 using JetBrains.Annotations;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
 
 namespace Content.Server.Construction.Completions
index a2579c92e803b618c767c69a2ebf601758cba04e..6cf32a5e4607b57e8eb87fdf03eaaf161686cc7a 100644 (file)
@@ -25,5 +25,5 @@ public sealed partial class PartExchangerComponent : Component
     [DataField("exchangeSound")]
     public SoundSpecifier ExchangeSound = new SoundPathSpecifier("/Audio/Items/rped.ogg");
 
-    public EntityUid? AudioStream;
+    public IPlayingAudioStream? AudioStream;
 }
index 75629146a4cdab23ba3111596f8421fbc46f2df2..4b543a0247a738c223e3975d4aa11c2b2e7c278f 100644 (file)
@@ -10,8 +10,6 @@ using Content.Shared.Storage;
 using Robust.Shared.Containers;
 using Robust.Shared.Utility;
 using Content.Shared.Wires;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Collections;
 
 namespace Content.Server.Construction;
@@ -36,7 +34,7 @@ public sealed class PartExchangerSystem : EntitySystem
     {
         if (args.Cancelled)
         {
-            component.AudioStream = _audio.Stop(component.AudioStream);
+            component.AudioStream?.Stop();
             return;
         }
 
@@ -170,7 +168,7 @@ public sealed class PartExchangerSystem : EntitySystem
             return;
         }
 
-        component.AudioStream = _audio.PlayPvs(component.ExchangeSound, uid).Value.Entity;
+        component.AudioStream = _audio.PlayPvs(component.ExchangeSound, uid);
 
         _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, component.ExchangeDuration, new ExchangerDoAfterEvent(), uid, target: args.Target, used: uid)
         {
index 32bb96e9e2879f18d2c56cef6229d5fcd9dcb884..16385d4d7ef8368a327c2e0cc1b95a63955d64cf 100644 (file)
@@ -11,7 +11,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Interaction.Events;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.GameStates;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
index 95819dd1fc45de2b0b4c1b3f84be234c351a5a02..bcd1e0423adab802dc1a33d3864b6e7fc5a5f59c 100644 (file)
@@ -3,7 +3,6 @@ using Content.Server.Stunnable;
 using Content.Shared.Damage;
 using Content.Shared.Effects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Physics.Events;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
index e9b074268f103d01c36e3f2d461b97118eb42694..ca5c6f5a09759e97cef99b52c607d30f288641d8 100644 (file)
@@ -12,8 +12,6 @@ using Content.Shared.Popups;
 using Content.Shared.Verbs;
 using Content.Shared.Wires;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Defusable.Systems;
 
index 7e43e72007821e317bdba4ce20ca45d3002c85b7..74e88292df35e8980e38942d48f5bb94aff4844f 100644 (file)
@@ -15,7 +15,6 @@ using Content.Shared.Database;
 using Content.Shared.Destructible;
 using Content.Shared.FixedPoint;
 using JetBrains.Annotations;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Containers;
 using Robust.Shared.Prototypes;
index 26ba01c359f9079bc9a1c24329aa831bfc9bfe05..74a4cdfb1b6060bb2e3db585b630ce38de49b44a 100644 (file)
@@ -1,6 +1,5 @@
 using Content.Shared.Audio;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Destructible.Thresholds.Behaviors
index 8ca6fd75c2ee1a88542c94034ae7c5a2b4b41894..8f4bade83a80cebf5821eb46ef48159b71cddee7 100644 (file)
@@ -1,7 +1,6 @@
 using Content.Server.DeviceLinking.Components;
 using Content.Server.DeviceLinking.Components.Overload;
 using Content.Server.DeviceLinking.Events;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
 
index 60d13b78fc214d3d62c82f64c48664d3213a87f9..5641b0b4aee8240b318b92a4c0f8707bd0306490 100644 (file)
@@ -5,9 +5,7 @@ using Content.Shared.Examine;
 using Content.Shared.Interaction;
 using Content.Shared.Tools;
 using Content.Shared.Popups;
-using Content.Shared.Tools.Systems;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
+using SharedToolSystem = Content.Shared.Tools.Systems.SharedToolSystem;
 using SignalReceivedEvent = Content.Server.DeviceLinking.Events.SignalReceivedEvent;
 
 namespace Content.Server.DeviceLinking.Systems;
index f6469d68b932d845fafd025709a8b7b2d2e938c9..7bcc438b92af02808282a5547f35c34f705381d5 100644 (file)
@@ -2,7 +2,6 @@ using Content.Server.DeviceLinking.Components;
 using Content.Server.DeviceNetwork;
 using Content.Shared.Interaction;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.DeviceLinking.Systems;
 
index 63bf5854d9cf3afecb80199f609e4cf7f4937d1e..3a7fd6bec996ce830a50c76d2c87e09c01dd7a6f 100644 (file)
@@ -4,8 +4,6 @@ using Content.Shared.Access.Systems;
 using Content.Shared.MachineLinking;
 using Content.Shared.TextScreen;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Timing;
 
 namespace Content.Server.DeviceLinking.Systems;
index 4deb08ec3dba1d51ef69c3312f28204db4a9f66d..a977a44287a1c19de3f23872882759186c7be9db 100644 (file)
@@ -15,7 +15,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Popups;
 using Content.Shared.Verbs;
 using JetBrains.Annotations;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
 using Robust.Shared.Player;
index 2d13679bd099f31d00d77fe7876324d131b4053c..beb2a284897a55484faaca0708f8eef0447f5415 100644 (file)
@@ -1,8 +1,6 @@
 using Content.Shared.Dice;
 using Content.Shared.Popups;
 using JetBrains.Annotations;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
 
 namespace Content.Server.Dice;
index fab16bc315d478360db017330b2a55b9c241d05b..477a167fa27c54c8313a0f443d055f5c569f4316 100644 (file)
@@ -13,7 +13,6 @@ using Content.Shared.Hands.Components;
 using Content.Shared.Movement.Events;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
 using Robust.Shared.Physics;
index f7d5cd783d45a616d4727675aa5ad1812716b309..52137f2ee6effd7a79077d4f0cc4879e9c4ebab1 100644 (file)
@@ -11,8 +11,6 @@ using Robust.Shared.Map;
 using Robust.Shared.Player;
 using Robust.Shared.Serialization.Manager;
 using System.Numerics;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Dragon;
 
index 93d6bc8db0b3a97c376f4837129b2e7c0d5a7e07..ed17ba8bdc2e1d29f062e78c52643f14c5af23e7 100644 (file)
@@ -10,8 +10,6 @@ using Content.Shared.Mind;
 using Content.Shared.Mind.Components;
 using Content.Shared.Mobs;
 using Content.Shared.Movement.Systems;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.GameStates;
 using Robust.Shared.Map;
 using Robust.Shared.Player;
@@ -205,7 +203,7 @@ public sealed partial class DragonSystem : EntitySystem
     private void Roar(EntityUid uid, DragonComponent comp)
     {
         if (comp.SoundRoar != null)
-            _audio.PlayPvs(comp.SoundRoar, uid);
+            _audio.Play(comp.SoundRoar, Filter.Pvs(uid, 4f, EntityManager), uid, true);
     }
 
     /// <summary>
index 4dc4f198a5aa9b45a5c1cca32b970aa6cab2ec56..8ddc8540c04a0b0fd0a3de16a76ddcb809f44f11 100644 (file)
@@ -26,7 +26,6 @@ using Content.Shared.Stunnable;
 using Content.Shared.Tag;
 using Content.Shared.Weapons.Melee.Events;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Physics.Events;
 using Robust.Shared.Player;
index ef8e1ffd987f304e1af954354f8f84f5162472e8..08374d739245af6e3eb8eecb4576d57a019737e9 100644 (file)
@@ -50,11 +50,11 @@ public sealed partial class ExplosionSystem : EntitySystem
         comp.Intensity = iterationIntensity;
         comp.SpaceMatrix = spaceMatrix;
         comp.SpaceTileSize = spaceData?.TileSize ?? DefaultTileSize;
-        Dirty(explosionEntity, comp);
+        Dirty(comp);
 
         // Light, sound & visuals may extend well beyond normal PVS range. In principle, this should probably still be
         // restricted to something like the same map, but whatever.
-        _pvsSys.AddGlobalOverride(GetNetEntity(explosionEntity));
+        _pvsSys.AddGlobalOverride(explosionEntity);
 
         var appearance = AddComp<AppearanceComponent>(explosionEntity);
         _appearance.SetData(explosionEntity, ExplosionAppearanceData.Progress, 1, appearance);
index 81324d00794301ab93eefd3282722f1861f2d3c2..aa1ad71b16c188796cff6595265251fedeca2803 100644 (file)
@@ -20,7 +20,6 @@ using Content.Shared.Throwing;
 using Robust.Server.GameStates;
 using Robust.Server.Player;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Map;
 using Robust.Shared.Physics.Components;
@@ -49,7 +48,6 @@ public sealed partial class ExplosionSystem : EntitySystem
     [Dependency] private readonly IChatManager _chat = default!;
     [Dependency] private readonly ThrowingSystem _throwingSystem = default!;
     [Dependency] private readonly PvsOverrideSystem _pvsSys = default!;
-    [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly SharedTransformSystem _transformSystem = default!;
 
     private EntityQuery<TransformComponent> _transformQuery;
@@ -336,7 +334,7 @@ public sealed partial class ExplosionSystem : EntitySystem
         // play sound.
         var audioRange = iterationIntensity.Count * 5;
         var filter = Filter.Pvs(epicenter).AddInRange(epicenter, audioRange);
-        _audio.PlayStatic(type.Sound.GetSound(), filter, mapEntityCoords, true, _audioParams);
+        SoundSystem.Play(type.Sound.GetSound(), filter, mapEntityCoords, _audioParams);
 
         return new Explosion(this,
             type,
index 854fa7f661e099fef8aec581bdc4b52c59951903..b57e9bd29872050d74b97432fa1b34da5b9c451e 100644 (file)
@@ -24,7 +24,6 @@ using Robust.Shared.Physics.Systems;
 using Content.Shared.Mobs;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Weapons.Ranged.Events;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Explosion.EntitySystems
 {
index 30895deb4c3c2df2cb2e648213897122fcae2acd..7b96b8b921787cae2ea55294df6a9819f2b44438 100644 (file)
@@ -9,7 +9,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Interaction.Events;
 using Content.Shared.Verbs;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Extinguisher;
@@ -19,7 +18,6 @@ public sealed class FireExtinguisherSystem : EntitySystem
     [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
     [Dependency] private readonly PopupSystem _popupSystem = default!;
     [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
-    [Dependency] private readonly SharedAudioSystem _audio = default!;
 
     public override void Initialize()
     {
@@ -88,7 +86,7 @@ public sealed class FireExtinguisherSystem : EntitySystem
             var drained = _solutionContainerSystem.Drain(target, targetSolution, transfer);
             _solutionContainerSystem.TryAddSolution(uid, container, drained);
 
-            _audio.PlayPvs(component.RefillSound, uid);
+            SoundSystem.Play(component.RefillSound.GetSound(), Filter.Pvs(uid), uid);
             _popupSystem.PopupEntity(Loc.GetString("fire-extinguisher-component-after-interact-refilled-message", ("owner", uid)),
                 uid, args.Target.Value);
         }
@@ -137,7 +135,8 @@ public sealed class FireExtinguisherSystem : EntitySystem
             return;
 
         extinguisher.Safety = !extinguisher.Safety;
-        _audio.PlayPvs(extinguisher.SafetySound, uid, AudioParams.Default.WithVariation(0.125f).WithVolume(-4f));
+        SoundSystem.Play(extinguisher.SafetySound.GetSound(), Filter.Pvs(uid),
+            uid, AudioHelpers.WithVariation(0.125f).WithVolume(-4f));
         UpdateAppearance(uid, extinguisher);
     }
 }
index 647f73bad35c24e54dc59628e96beadf4da7341d..ec95d71dcf40454940c95f11c4356f0e45aa138b 100644 (file)
@@ -19,7 +19,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Paper;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Player;
 
index 29d603bfc6b0fc3ad7bf2fa8b732e10b8e6a4bd5..bc2c4ddabafd8b29da31f261b9d10a417e441aad 100644 (file)
@@ -15,7 +15,6 @@ using Content.Shared.Physics;
 using Content.Shared.Tag;
 using Content.Shared.Traits.Assorted;
 using Content.Shared.Weapons.Melee.Events;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
 using Robust.Shared.Player;
@@ -173,7 +172,7 @@ namespace Content.Server.Flash
             }
             if (sound != null)
             {
-                _audio.PlayPvs(sound, source);
+                SoundSystem.Play(sound.GetSound(), Filter.Pvs(transform), source);
             }
         }
 
index e5ddff6c07ccccab1638e8c7ad15ccd0d5b8b907..facc39f146180778551daa9f17b906a8c4c1cc29 100644 (file)
@@ -8,7 +8,6 @@ using Content.Shared.Fluids.Components;
 using Content.Shared.Interaction;
 using Content.Shared.Timing;
 using Content.Shared.Weapons.Melee;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Utility;
index 505ce71261fb00fb1e5ad025b9ee1740ce70c470..ea3df2f8c4685f041f5bda40fb503f683050eadc 100644 (file)
@@ -13,9 +13,6 @@ using Content.Shared.Fluids.Components;
 using Content.Shared.Interaction;
 using Content.Shared.Tag;
 using Content.Shared.Verbs;
-using Content.Shared.Fluids.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Collections;
 using Robust.Shared.Random;
 using Robust.Shared.Utility;
index 4c28e3d7009e5235081c4f6c042b3f5e285f51da..886cb9eff14f91c9857e4260e92f4088ce32e407 100644 (file)
@@ -30,11 +30,6 @@ using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
-using Content.Shared.Movement.Components;
-using Content.Shared.Movement.Systems;
-using Content.Shared.Maps;
-using Content.Shared.Effects;
-using Robust.Server.Audio;
 
 namespace Content.Server.Fluids.EntitySystems;
 
@@ -451,7 +446,8 @@ public sealed partial class PuddleSystem : SharedPuddleSystem
             return true;
         }
 
-        _audio.PlayPvs(puddleComponent.SpillSound, puddleUid);
+        SoundSystem.Play(puddleComponent.SpillSound.GetSound(),
+            Filter.Pvs(puddleUid), puddleUid);
         return true;
     }
 
index 1b87b3ef246d692c5063294b4878939ba7b4563b..f0afd43dd2fb4d10e5751b62a5b2ddddb6a85c85 100644 (file)
@@ -12,8 +12,6 @@ using Content.Shared.FixedPoint;
 using Content.Shared.Interaction;
 using Content.Shared.Vapor;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Timing;
index a073574e1d14173e967fb1f61cc0f2b5eecb4ba2..acf7cbd80dcc4a38e731566bef0a22c70a228a56 100644 (file)
@@ -8,7 +8,6 @@ using Content.Shared.Forensics;
 using Content.Shared.Hands.EntitySystems;
 using Content.Shared.Interaction;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio.Systems;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
 using Robust.Shared.Player;
index ad82733341c21f1adb85837863b7002bdbfd9d2b..dfd2e98499c25fc27c1387d18dede76f78a7d68e 100644 (file)
@@ -34,7 +34,7 @@ namespace Content.Server.GameTicking
                 if (args.NewStatus != SessionStatus.Disconnected)
                 {
                     mind.Session = session;
-                    _pvsOverride.AddSessionOverride(GetNetEntity(mindId.Value), session);
+                    _pvsOverride.AddSessionOverride(mindId.Value, session);
                 }
 
                 DebugTools.Assert(mind.Session == session);
@@ -122,7 +122,7 @@ namespace Content.Server.GameTicking
                     _chatManager.SendAdminAnnouncement(Loc.GetString("player-leave-message", ("name", args.Session.Name)));
                     if (mind != null)
                     {
-                        _pvsOverride.ClearOverride(GetNetEntity(mindId!.Value));
+                        _pvsOverride.ClearOverride(mindId!.Value);
                         mind.Session = null;
                     }
 
index 6b714c7d216e87e9a0ad57b4a225906ed4deecbf..85f833bd1c3264111f6f49c60b3e188eeb934806 100644 (file)
@@ -360,7 +360,7 @@ namespace Content.Server.GameTicking
                     playerIcName = icName;
 
                 if (TryGetEntity(mind.OriginalOwnedEntity, out var entity))
-                    _pvsOverride.AddGlobalOverride(GetNetEntity(entity.Value), recursive: true);
+                    _pvsOverride.AddGlobalOverride(entity.Value, recursive: true);
 
                 var roles = _roles.MindGetAllRoles(mindId);
 
@@ -609,7 +609,7 @@ namespace Content.Server.GameTicking
                 _chatSystem.DispatchGlobalAnnouncement(Loc.GetString(proto.Message), playSound: true);
 
             if (proto.Sound != null)
-                _audio.PlayGlobal(proto.Sound, Filter.Broadcast(), true);
+                SoundSystem.Play(proto.Sound.GetSound(), Filter.Broadcast());
         }
 
         private async void SendRoundStartedDiscordMessage()
index 8da271e1a8d8093871fc1047b97f6aeffde825dd..14819fb0acaa6b672c9414517d4c88e1df494fdc 100644 (file)
@@ -19,8 +19,6 @@ using Content.Shared.Roles;
 using Robust.Server;
 using Robust.Server.GameObjects;
 using Robust.Server.GameStates;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Console;
 using Robust.Shared.Map;
@@ -63,7 +61,6 @@ namespace Content.Server.GameTicking
         [Dependency] private readonly PlayTimeTrackingSystem _playTimeTrackings = default!;
         [Dependency] private readonly PvsOverrideSystem _pvsOverride = default!;
         [Dependency] private readonly ServerUpdateManager _serverUpdates = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
         [Dependency] private readonly StationJobsSystem _stationJobs = default!;
         [Dependency] private readonly StationSpawningSystem _stationSpawning = default!;
         [Dependency] private readonly SharedTransformSystem _transform = default!;
index bb8582c34bbcce0f27d5ca6a6f817c17e292d7f9..779c47885f2f21c29f3adcb4679537a2cedfc704 100644 (file)
@@ -44,7 +44,6 @@ using Robust.Server.GameObjects;
 using Robust.Server.Maps;
 using Robust.Server.Player;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
index c5b58544750e71d2f27c54f0c754612a7778352e..0785d81d09b7bc1ea720eb412cf36cdb6aa1b24e 100644 (file)
@@ -15,9 +15,6 @@ using Content.Shared.Preferences;
 using Content.Shared.Roles;
 using Robust.Server.GameObjects;
 using Robust.Server.Maps;
-using Robust.Server.Player;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Enums;
 using Robust.Shared.Map;
index 145b4192b58b86896a3da58e6d65432cf34007f3..ef949d09fc98d5f1faf871970a796bdb50ad3aaf 100644 (file)
@@ -17,9 +17,6 @@ using Content.Shared.PDA;
 using Content.Shared.Preferences;
 using Content.Shared.Roles;
 using Content.Shared.Roles.Jobs;
-using Robust.Server.Player;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
index f4319815a7adc3755547bf59b54239104dd68a00..a4febc385c1dae8e73c17f1446fbd5ce290e0668 100644 (file)
@@ -22,8 +22,6 @@ using Content.Shared.Roles;
 using Content.Shared.Zombies;
 using Robust.Server.GameObjects;
 using Robust.Server.Player;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
index f498d70975fdf0498ec5f5052e0f3c63c2a7fa40..ae00cd378c0756fc84928085eac4086fc8108382 100644 (file)
@@ -7,7 +7,6 @@ using Content.Shared.Teleportation.Systems;
 using Content.Shared.Verbs;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.GameObjects;
 using Robust.Shared.Timing;
 
index 7fbbf7f4f649a6d1d727d32b42c722707f12f3c3..4f7d19b0a8b0c620e7b75243169cbe5b8e86eecd 100644 (file)
@@ -5,7 +5,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Tag;
 using Content.Shared.Weapons.Melee.Events;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 
index 58eed00c492bfef408523fc66cf4fd0ef9950f7f..eaf95a1f1dcab2e9632b80fd9913f43330dd2a99 100644 (file)
@@ -9,8 +9,6 @@ using Content.Shared.Database;
 using Content.Shared.Hands;
 using Robust.Shared.Timing;
 using Content.Shared.Interaction.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Glue;
 
index 25009ed7dd5ee5952f60a39aba9dfe53c7a23f89..b6121a7fbda42c95c4b5a85856c1a1da0a2fe13f 100644 (file)
@@ -13,8 +13,6 @@ using Content.Shared.Interaction.Events;
 using Content.Shared.Mobs;
 using Content.Shared.Popups;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Player;
 using Robust.Shared.Utility;
@@ -196,14 +194,14 @@ namespace Content.Server.Guardian
             if (TryComp<GuardianComponent>(guardian, out var guardianComp))
             {
                 guardianComp.Host = args.Args.Target.Value;
-                _audio.PlayPvs("/Audio/Effects/guardian_inject.ogg", args.Args.Target.Value);
+                _audio.Play("/Audio/Effects/guardian_inject.ogg", Filter.Pvs(args.Args.Target.Value), args.Args.Target.Value, true);
                 _popupSystem.PopupEntity(Loc.GetString("guardian-created"), args.Args.Target.Value, args.Args.Target.Value);
                 // Exhaust the activator
                 component.Used = true;
             }
             else
             {
-                Log.Error($"Tried to spawn a guardian that doesn't have {nameof(GuardianComponent)}");
+                Logger.ErrorS("guardian", $"Tried to spawn a guardian that doesn't have {nameof(GuardianComponent)}");
                 EntityManager.QueueDeleteEntity(guardian);
             }
 
@@ -221,12 +219,12 @@ namespace Content.Server.Guardian
             if (args.NewMobState == MobState.Critical)
             {
                 _popupSystem.PopupEntity(Loc.GetString("guardian-host-critical-warn"), component.HostedGuardian.Value, component.HostedGuardian.Value);
-                _audio.PlayPvs("/Audio/Effects/guardian_warn.ogg", component.HostedGuardian.Value);
+                _audio.Play("/Audio/Effects/guardian_warn.ogg", Filter.Pvs(component.HostedGuardian.Value), component.HostedGuardian.Value, true);
             }
             else if (args.NewMobState == MobState.Dead)
             {
                 //TODO: Replace WithVariation with datafield
-                _audio.PlayPvs("/Audio/Voice/Human/malescream_guardian.ogg", uid, AudioParams.Default.WithVariation(0.20f));
+                _audio.Play("/Audio/Voice/Human/malescream_guardian.ogg", Filter.Pvs(uid), uid, true, AudioHelpers.WithVariation(0.20f));
                 EntityManager.RemoveComponent<GuardianHostComponent>(uid);
             }
         }
index 40b365105d14e47fccd83d449d618c5e9eb00746..4581d378f69c08b41ae151e02b4c6df7bf93e3ac 100644 (file)
@@ -4,7 +4,6 @@ using Content.Shared.Database;
 using Content.Shared.Examine;
 using Content.Shared.Interaction.Events;
 using Content.Shared.Item;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Map.Components;
 using Robust.Shared.Physics.Components;
index d80d7ecbfcfbb8e21581410351403ecc5c376a0a..256a8578642ad4f7f554549714a7254e32a5e6f1 100644 (file)
@@ -1,7 +1,6 @@
 using Content.Server.Explosion.EntitySystems;
 using Content.Shared.Timing;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Timing;
 
 namespace Content.Server.IgnitionSource;
index 0fa8f7d292f2cd6b52f562d7a28e8ce3b6953d64..d688941abff37a48c920acf9b81a058ec9aea14d 100644 (file)
@@ -3,8 +3,6 @@ using Content.Server.Popups;
 using Content.Shared.Body.Components;
 using Content.Shared.Examine;
 using Content.Shared.Popups;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Physics.Events;
index 474284cf8066712731e8699e331a02177d644c23..86158fb7a89f5a67a0803423295172197d719c48 100644 (file)
@@ -6,7 +6,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Mobs.Systems;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
@@ -19,7 +18,6 @@ public sealed class InteractionPopupSystem : EntitySystem
     [Dependency] private readonly IRobustRandom _random = default!;
     [Dependency] private readonly MobStateSystem _mobStateSystem = default!;
     [Dependency] private readonly PopupSystem _popupSystem = default!;
-    [Dependency] private readonly SharedAudioSystem _audio = default!;
 
     public override void Initialize()
     {
@@ -43,17 +41,15 @@ public sealed class InteractionPopupSystem : EntitySystem
         if (curTime < component.LastInteractTime + component.InteractDelay)
             return;
 
-        if (TryComp<MobStateComponent>(uid, out var state)
-            && !_mobStateSystem.IsAlive(uid, state))
-        {
+        if (TryComp<MobStateComponent>(uid, out var state) // if it has a MobStateComponent,
+            && !_mobStateSystem.IsAlive(uid, state))                           // AND if that state is not Alive (e.g. dead/incapacitated/critical)
             return;
-        }
 
         // TODO: Should be an attempt event
         // TODO: Need to handle pausing with an accumulator.
 
         string msg = ""; // Stores the text to be shown in the popup message
-        SoundSpecifier? sfx = null; // Stores the filepath of the sound to be played
+        string? sfx = null; // Stores the filepath of the sound to be played
 
         if (_random.Prob(component.SuccessChance))
         {
@@ -61,7 +57,7 @@ public sealed class InteractionPopupSystem : EntitySystem
                 msg = Loc.GetString(component.InteractSuccessString, ("target", Identity.Entity(uid, EntityManager))); // Success message (localized).
 
             if (component.InteractSuccessSound != null)
-                sfx = component.InteractSuccessSound;
+                sfx = component.InteractSuccessSound.GetSound();
 
             if (component.InteractSuccessSpawn != null)
                 Spawn(component.InteractSuccessSpawn, Transform(uid).MapPosition);
@@ -72,7 +68,7 @@ public sealed class InteractionPopupSystem : EntitySystem
                 msg = Loc.GetString(component.InteractFailureString, ("target", Identity.Entity(uid, EntityManager))); // Failure message (localized).
 
             if (component.InteractFailureSound != null)
-                sfx = component.InteractFailureSound;
+                sfx = component.InteractFailureSound.GetSound();
 
             if (component.InteractFailureSpawn != null)
                 Spawn(component.InteractFailureSpawn, Transform(uid).MapPosition);
@@ -80,7 +76,7 @@ public sealed class InteractionPopupSystem : EntitySystem
 
         if (component.MessagePerceivedByOthers != null)
         {
-            var msgOthers = Loc.GetString(component.MessagePerceivedByOthers,
+            string msgOthers = Loc.GetString(component.MessagePerceivedByOthers,
                 ("user", Identity.Entity(args.User, EntityManager)), ("target", Identity.Entity(uid, EntityManager)));
             _popupSystem.PopupEntity(msg, uid, args.User);
             _popupSystem.PopupEntity(msgOthers, uid, Filter.PvsExcept(args.User, entityManager: EntityManager), true);
@@ -91,9 +87,9 @@ public sealed class InteractionPopupSystem : EntitySystem
         if (sfx is not null) //not all cases will have sound.
         {
             if (component.SoundPerceivedByOthers)
-                _audio.PlayPvs(sfx, args.Target); //play for everyone in range
+                SoundSystem.Play(sfx, Filter.Pvs(args.Target), args.Target); //play for everyone in range
             else
-                _audio.PlayEntity(sfx, Filter.Entities(args.User, args.Target), args.Target, true); //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;
index fb72148b88b1e261d85abe907c8012a9cbfd7be2..5610582007d68a9b71505d472abc562916c86246 100644 (file)
@@ -4,8 +4,6 @@ using Content.Shared.Interaction.Events;
 using Content.Shared.Item;
 using Content.Shared.Toggleable;
 using Content.Shared.Tools.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Weapons.Melee.ItemToggle;
@@ -55,7 +53,7 @@ public sealed class ItemToggleSystem : EntitySystem
         if (TryComp<DisarmMalusComponent>(uid, out var malus))
             malus.Malus -= comp.ActivatedDisarmMalus;
 
-        _audio.PlayEntity(comp.DeActivateSound, Filter.Pvs(uid, entityManager: EntityManager), uid, true, comp.DeActivateSound.Params);
+        _audio.Play(comp.DeActivateSound, Filter.Pvs(uid, entityManager: EntityManager), uid, true, comp.DeActivateSound.Params);
 
         comp.Activated = false;
     }
@@ -68,7 +66,7 @@ public sealed class ItemToggleSystem : EntitySystem
         if (TryComp<DisarmMalusComponent>(uid, out var malus))
             malus.Malus += comp.ActivatedDisarmMalus;
 
-        _audio.PlayEntity(comp.ActivateSound, Filter.Pvs(uid, entityManager: EntityManager), uid, true, comp.ActivateSound.Params);
+        _audio.Play(comp.ActivateSound, Filter.Pvs(uid, entityManager: EntityManager), uid, true, comp.ActivateSound.Params);
 
         comp.Activated = true;
     }
index a92da9d2cbecc8453ebc5cdc673fb2ad3222d952..538a069d16cb8950719788600656f4143182f3de 100644 (file)
@@ -29,8 +29,7 @@ namespace Content.Server.Kitchen.Components
         [DataField("ItemBreakSound")]
         public SoundSpecifier ItemBreakSound = new SoundPathSpecifier("/Audio/Effects/clang.ogg");
 
-        public EntityUid? PlayingStream;
-
+        public IPlayingAudioStream? PlayingStream { get; set; }
         [DataField("loopingSound")]
         public SoundSpecifier LoopingSound = new SoundPathSpecifier("/Audio/Machines/microwave_loop.ogg");
         #endregion
index 2a028a85805b7db70323b2479610b45a4c6628eb..4b53049086de8fd6bf2d82634349d6633b72521e 100644 (file)
@@ -48,7 +48,7 @@ namespace Content.Server.Kitchen.Components
         [DataField("juiceSound"), ViewVariables(VVAccess.ReadWrite)]
         public SoundSpecifier JuiceSound { get; set; } = new SoundPathSpecifier("/Audio/Machines/juicer.ogg");
 
-        public EntityUid? AudioStream;
+        public IPlayingAudioStream? AudioStream;
     }
 
     [Access(typeof(ReagentGrinderSystem)), RegisterComponent]
index 0419e13d230cac0251bc1361d74d52306709307f..6e563ff45fd5c29d55deffcfabfbf517b3e0609d 100644 (file)
@@ -16,8 +16,6 @@ using Content.Shared.Nutrition.Components;
 using Content.Shared.Popups;
 using Content.Shared.Storage;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
 using static Content.Shared.Kitchen.Components.KitchenSpikeComponent;
@@ -156,7 +154,7 @@ namespace Content.Server.Kitchen.EntitySystems
                 QueueDel(gib);
             }
 
-            _audio.PlayEntity(component.SpikeSound, Filter.Pvs(uid), uid, true);
+            _audio.Play(component.SpikeSound, Filter.Pvs(uid), uid, true);
         }
 
         private bool TryGetPiece(EntityUid uid, EntityUid user, EntityUid used,
index e46cc76a0ed2dcc0c51f47189287bf3a036b95c8..1c8dbfb4df95dbdd2d3a1638440fa88132e62e00 100644 (file)
@@ -24,7 +24,6 @@ using Content.Shared.Tag;
 using Robust.Server.Containers;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Player;
 
@@ -74,7 +73,7 @@ namespace Content.Server.Kitchen.EntitySystems
             SetAppearance(uid, MicrowaveVisualState.Cooking, microwaveComponent);
 
             microwaveComponent.PlayingStream =
-                _audio.PlayPvs(microwaveComponent.LoopingSound, uid, AudioParams.Default.WithLoop(true).WithMaxDistance(5)).Value.Entity;
+                _audio.PlayPvs(microwaveComponent.LoopingSound, uid, AudioParams.Default.WithLoop(true).WithMaxDistance(5));
         }
 
         private void OnCookStop(EntityUid uid, ActiveMicrowaveComponent component, ComponentShutdown args)
@@ -83,7 +82,7 @@ namespace Content.Server.Kitchen.EntitySystems
                 return;
             SetAppearance(uid, MicrowaveVisualState.Idle, microwaveComponent);
 
-            microwaveComponent.PlayingStream = _audio.Stop(microwaveComponent.PlayingStream);
+            microwaveComponent.PlayingStream?.Stop();
         }
 
         /// <summary>
index 3a6d5e4134c225c0fd10578151a48be6208e5fdc..6ce53dc53021c8bedde529e1df6120ecc881d8d6 100644 (file)
@@ -16,7 +16,6 @@ using Content.Shared.Stacks;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Timing;
 
@@ -65,7 +64,7 @@ namespace Content.Server.Kitchen.EntitySystems
                 if (active.EndTime > _timing.CurTime)
                     continue;
 
-                reagentGrinder.AudioStream = _audioSystem.Stop(reagentGrinder.AudioStream);
+                reagentGrinder.AudioStream?.Stop();
                 RemCompDeferred<ActiveReagentGrinderComponent>(uid);
 
                 var inputContainer = _containerSystem.EnsureContainer<Container>(uid, SharedReagentGrinder.InputContainerId);
@@ -285,7 +284,7 @@ namespace Content.Server.Kitchen.EntitySystems
             active.Program = program;
 
             reagentGrinder.AudioStream = _audioSystem.PlayPvs(sound, uid,
-                AudioParams.Default.WithPitchScale(1 / reagentGrinder.WorkTimeMultiplier)).Value.Entity; //slightly higher pitched
+                AudioParams.Default.WithPitchScale(1 / reagentGrinder.WorkTimeMultiplier)); //slightly higher pitched
             _userInterfaceSystem.TrySendUiMessage(uid, ReagentGrinderUiKey.Key,
                 new ReagentGrinderWorkStartedMessage(program));
         }
index c6614fcd4f98c0ae098d985a12c571239b8d57e8..309ee583162a2478900d008e163d51f0be61c296 100644 (file)
@@ -16,8 +16,6 @@ using Content.Shared.Research.Components;
 using Content.Shared.Research.Prototypes;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Timing;
 
index 40d212c6ad90769d39783ccefd3a89b3bac9ccca..f4db4216cfe1f6000b3de4a7e3c6f8781ecc1707 100644 (file)
@@ -9,9 +9,6 @@ using Content.Shared.Temperature;
 using Content.Shared.Verbs;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
-using Robust.Shared.Player;
 using Robust.Shared.Utility;
 
 namespace Content.Server.Light.EntitySystems
index 70ce3c748809e55d9713ae93a5bbabc67587e0d1..f3e7eaca0eab6ba1563f7086e586e09aa18dea5e 100644 (file)
@@ -9,10 +9,6 @@ using Content.Shared.Light.Components;
 using Content.Shared.Rounding;
 using Content.Shared.Toggleable;
 using Content.Shared.Verbs;
-using JetBrains.Annotations;
-using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.GameStates;
 using Robust.Shared.Utility;
index 5714bde3e5f0c4289b7e609c3c2768a77e80eb92..43b0b4662c84250c56f94475dd239bd4aed02a61 100644 (file)
@@ -4,7 +4,6 @@ using Content.Shared.Light.Components;
 using Content.Shared.Throwing;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Light.EntitySystems
@@ -12,7 +11,6 @@ namespace Content.Server.Light.EntitySystems
     public sealed class LightBulbSystem : EntitySystem
     {
         [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
 
         public override void Initialize()
         {
@@ -70,7 +68,7 @@ namespace Content.Server.Light.EntitySystems
             if (!Resolve(uid, ref bulb))
                 return;
 
-            _audio.PlayPvs(bulb.BreakSound, uid);
+            SoundSystem.Play(bulb.BreakSound.GetSound(), Filter.Pvs(uid), uid);
         }
 
         private void UpdateAppearance(EntityUid uid, LightBulbComponent? bulb = null,
index 8347f14ea46e77547f95d0ba2f997e9023cbe9a8..d37080a1e10e0db1b418061a0e5dcfb5da4baf55 100644 (file)
@@ -6,8 +6,6 @@ using Content.Shared.Light.Components;
 using Content.Shared.Popups;
 using Content.Shared.Storage;
 using JetBrains.Annotations;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 
 namespace Content.Server.Light.EntitySystems;
index 2195c69b184b1a704e96549bec1bf4f7150eaefd..88f416ce9d46e577f34c057ab1ff92a79576347f 100644 (file)
@@ -7,7 +7,6 @@ using Content.Shared.Smoking;
 using Content.Shared.Temperature;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Light.EntitySystems
@@ -16,7 +15,6 @@ namespace Content.Server.Light.EntitySystems
     {
         [Dependency] private readonly AtmosphereSystem _atmosphereSystem = default!;
         [Dependency] private readonly SharedAppearanceSystem _appearance = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
         [Dependency] private readonly SharedItemSystem _item = default!;
         [Dependency] private readonly SharedPointLightSystem _lights = default!;
         [Dependency] private readonly TransformSystem _transformSystem = default!;
@@ -81,7 +79,8 @@ namespace Content.Server.Light.EntitySystems
             var component = matchstick.Comp;
 
             // Play Sound
-            _audio.PlayPvs(component.IgniteSound, matchstick, AudioParams.Default.WithVariation(0.125f).WithVolume(-0.125f));
+            SoundSystem.Play(component.IgniteSound.GetSound(), Filter.Pvs(matchstick),
+                matchstick, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f));
 
             // Change state
             SetState(matchstick, component, SmokableState.Lit);
index d157866c7665b90f109a27714bf5316e4d0a45f6..cd4322aa26720cf06ebd60f3b5c63bba8bde5835 100644 (file)
@@ -23,12 +23,6 @@ using Robust.Shared.Audio;
 using Robust.Shared.Containers;
 using Robust.Shared.Player;
 using Robust.Shared.Timing;
-using Content.Shared.DoAfter;
-using Content.Server.Emp;
-using Content.Server.DeviceLinking.Events;
-using Content.Server.DeviceLinking.Systems;
-using Content.Shared.Inventory;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Light.EntitySystems
 {
@@ -136,7 +130,7 @@ namespace Content.Server.Light.EntitySystems
                     if (damage != null)
                         _adminLogger.Add(LogType.Damaged, $"{ToPrettyString(args.User):user} burned their hand on {ToPrettyString(args.Target):target} and received {damage.Total:damage} damage");
 
-                    _audio.PlayEntity(light.BurnHandSound, Filter.Pvs(uid), uid, true);
+                    _audio.Play(light.BurnHandSound, Filter.Pvs(uid), uid, true);
 
                     args.Handled = true;
                     return;
@@ -287,7 +281,7 @@ namespace Content.Server.Light.EntitySystems
                         if (time > light.LastThunk + ThunkDelay)
                         {
                             light.LastThunk = time;
-                            _audio.PlayEntity(light.TurnOnSound, Filter.Pvs(uid), uid, true, AudioParams.Default.WithVolume(-10f));
+                            _audio.Play(light.TurnOnSound, Filter.Pvs(uid), uid, true, AudioParams.Default.WithVolume(-10f));
                         }
                     }
                     else
index a1ed71ee4cdb48aece8a605de4e00df9bde07e6e..c24966aba82387025fbada939420d4eb52907ee4 100644 (file)
@@ -7,8 +7,6 @@ using Content.Shared.Light.Components;
 using Content.Shared.Mind.Components;
 using Content.Shared.Toggleable;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 using Robust.Shared.Utility;
index 86921d222ce50aab42926ad9bf5e4c41f4ef3d73..10a30dc25cbdcac5e03868641c5caa647e4e3671 100644 (file)
@@ -7,8 +7,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Item;
 using Content.Shared.Lube;
 using Content.Shared.Popups;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
 
 namespace Content.Server.Lube;
index 42bae2ba6fce8bfa827dbbf7fb85478b011a0acb..4fbd9e3ec78de57802d49cf032e13f1fbc81737a 100644 (file)
@@ -19,7 +19,6 @@ using Content.Shared.Physics;
 using Content.Shared.Storage;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Random;
 using Robust.Shared.Serialization.Manager;
index 07c1e11cef3d6291e1a2c013bcb23b307e7c938a..5c539720a3b46df7a8b37c93a95607cdbb57dae1 100644 (file)
@@ -17,19 +17,6 @@ using Content.Shared.MassMedia.Components;
 using Content.Shared.MassMedia.Systems;
 using Content.Shared.PDA;
 using Robust.Server.GameObjects;
-using System.Linq;
-using Content.Server.Administration.Logs;
-using Content.Server.CartridgeLoader.Cartridges;
-using Content.Shared.CartridgeLoader;
-using Content.Shared.CartridgeLoader.Cartridges;
-using Content.Server.CartridgeLoader;
-using Content.Server.GameTicking;
-using Robust.Shared.Timing;
-using Content.Server.Popups;
-using Content.Server.StationRecords.Systems;
-using Content.Shared.Database;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Player;
 using Robust.Shared.Timing;
index 99b2116e2562421e41efa3868e5b880590caab9d..b3626774c83eabb7d1a8453b43437249f1f04c79 100644 (file)
@@ -8,8 +8,6 @@ using Content.Server.Construction.Components;
 using Content.Server.Stack;
 using Content.Shared.Database;
 using JetBrains.Annotations;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Prototypes;
 
index df94bc94eefa8967ab69317b0d6fccafb9d2c953..1424f880f360c01ccf4e7a369ef522e23802c9dd 100644 (file)
@@ -43,7 +43,7 @@ public sealed partial class MechGrabberComponent : Component
     [DataField("grabSound")]
     public SoundSpecifier GrabSound = new SoundPathSpecifier("/Audio/Mecha/sound_mecha_hydraulic.ogg");
 
-    public EntityUid? AudioStream;
+    public IPlayingAudioStream? AudioStream;
 
     [ViewVariables(VVAccess.ReadWrite)]
     public Container ItemContainer = default!;
index 8b7a4c62040f35fc65b04ee09fb576b1712517f6..499f833ac83eded7059b384934b5ec8bccfdbfd0 100644 (file)
@@ -10,8 +10,6 @@ using Content.Shared.Mech.Equipment.Components;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Wall;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
 using Robust.Shared.Physics;
@@ -151,7 +149,7 @@ public sealed class MechGrabberSystem : EntitySystem
             return;
 
         args.Handled = true;
-        component.AudioStream = _audio.PlayPvs(component.GrabSound, uid).Value.Entity;
+        component.AudioStream = _audio.PlayPvs(component.GrabSound, uid);
         _doAfter.TryStartDoAfter(new DoAfterArgs(EntityManager, args.User, component.GrabDelay, new GrabberDoAfterEvent(), uid, target: target, used: uid)
         {
             BreakOnTargetMove = true,
@@ -163,7 +161,7 @@ public sealed class MechGrabberSystem : EntitySystem
     {
         if (args.Cancelled)
         {
-            component.AudioStream = _audio.Stop(component.AudioStream);
+            component.AudioStream?.Stop();
             return;
         }
 
index 20ac9420aab60271fde1ad3f214d30c6a546190a..f16d13c23cbac80ec30ac77181b5097491c4de34 100644 (file)
@@ -24,8 +24,6 @@ using Content.Shared.Nutrition.Components;
 using Content.Shared.Popups;
 using Content.Shared.Throwing;
 using Robust.Server.Player;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Random;
index 320b71576e3d8e25497001dbfab7d2c6de99315c..d041f8ee9d7548f5b1339f60a7c0b43b3e85bd71 100644 (file)
@@ -18,7 +18,6 @@ using Content.Shared.Mobs.Components;
 using Content.Shared.Mobs.Systems;
 using Content.Shared.Timing;
 using Content.Shared.Toggleable;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Timing;
 
index 57f66f2378ab49029c9820615df542d39051174f..2e04e1b03cbfaad0727df235ff8785ebcef4f991 100644 (file)
@@ -16,8 +16,6 @@ using Content.Shared.Mobs.Components;
 using Content.Shared.Mobs.Systems;
 using Content.Shared.Stacks;
 using Content.Server.Popups;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Random;
 
 namespace Content.Server.Medical;
index fe3944b21ee35b2a95220b404ffbb8e850129b14..cde361ec74c1324a99aeb14e08bf9a57866514e5 100644 (file)
@@ -8,8 +8,6 @@ using Content.Shared.Mobs.Components;
 using Robust.Server.GameObjects;
 using Content.Server.Temperature.Components;
 using Content.Server.Body.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Medical
index 974c1981b569678db43ffa54b14139916dd7be0c..d754bfd05ef80fe4f156e6f6a0ba9e61edab5e37 100644 (file)
@@ -10,7 +10,6 @@ using Content.Shared.IdentityManagement;
 using Content.Shared.Nutrition.Components;
 using Content.Shared.Nutrition.EntitySystems;
 using Content.Shared.StatusEffect;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
 using Robust.Shared.Prototypes;
index 36b5d7ec334b577221659f712fca447aed021e73..f23e9b640735dca05e963dcb23ed16be3874e65c 100644 (file)
@@ -324,8 +324,7 @@ public sealed class MindSystem : SharedMindSystem
             return;
 
         Dirty(mindId, mind);
-        var netMind = GetNetEntity(mindId);
-        _pvsOverride.ClearOverride(netMind);
+        _pvsOverride.ClearOverride(mindId);
         if (userId != null && !_players.TryGetPlayerData(userId.Value, out _))
         {
             Log.Error($"Attempted to set mind user to invalid value {userId}");
@@ -367,7 +366,7 @@ public sealed class MindSystem : SharedMindSystem
         if (_players.TryGetSessionById(userId.Value, out var ret))
         {
             mind.Session = ret;
-            _pvsOverride.AddSessionOverride(netMind, ret);
+            _pvsOverride.AddSessionOverride(mindId, ret);
             _actor.Attach(mind.CurrentEntity, ret);
         }
 
index 7f3c7aa1e90e2de9f0fd8e1ea2c08ccf7aa62552..8d05d0abd14657d5eee850c3b6d7a03abdb3543f 100644 (file)
@@ -14,8 +14,6 @@ using Content.Shared.Storage;
 using Content.Shared.Storage.Components;
 using Content.Shared.Verbs;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Morgue;
index b05c4414bcc060cce6575186f661bd8ddafd1e93..91fb0ab9f1f127f609d3f6f9b5b19145a30a572a 100644 (file)
@@ -3,9 +3,6 @@ using Content.Shared.Body.Components;
 using Content.Shared.Examine;
 using Content.Shared.Morgue;
 using Content.Shared.Morgue.Components;
-using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Morgue;
index 052262cac51c3a1e40dfda9416aa538f58935d39..311fd234684dbd34c1b392785cea62db042ad1a8 100644 (file)
@@ -5,9 +5,6 @@ using Content.Shared.Damage;
 using Content.Shared.Interaction;
 using Content.Shared.Popups;
 using Content.Shared.Silicons.Bots;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
-using Robust.Shared.Player;
 
 namespace Content.Server.NPC.HTN.PrimitiveTasks.Operators.Specific;
 
index 7b012300da29e25859ea048bdc60965fcbbc717b..fe01b2fcbe85e694344dbbb90f9e3c8533755dea 100644 (file)
@@ -1,8 +1,6 @@
 using Content.Server.Interaction;
 using Content.Server.Weapons.Ranged.Systems;
 using Content.Shared.Weapons.Melee;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Physics.Systems;
 using Robust.Shared.Random;
index bae999faffe5793e85852acb67a182b76ee61de3..37bf0eade1887390e708bb2590ef409102ce49af 100644 (file)
@@ -7,7 +7,6 @@ using Content.Shared.Ninja.Components;
 using Content.Shared.Ninja.Systems;
 using Content.Shared.Popups;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Ninja.Systems;
 
index 79e504da0a96f87c75b9d7bf31f5a471d2ba6e21..6de2d7dee00314105181d0dcb63821585a2ef9ca 100644 (file)
@@ -24,9 +24,7 @@ using Robust.Shared.Audio;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
 using System.Diagnostics.CodeAnalysis;
-using System.Linq;
 using Content.Server.Objectives.Components;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Ninja.Systems;
 
index a22794e17c5fda2bafacb1d826903fdfe89e40ba..70182e0e36f24f9c41ae6446fa0a6329f33173b5 100644 (file)
@@ -7,7 +7,6 @@ using Content.Shared.Ninja.Systems;
 using Content.Shared.Popups;
 using Content.Shared.Whitelist;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Timing;
 
 namespace Content.Server.Ninja.Systems;
index 16377d5f758f68af5398a1a5dc6a313ac8a5ffd2..2b9c9fe01e4094752d1d2e6d512adcd088c60523 100644 (file)
@@ -174,7 +174,7 @@ namespace Content.Server.Nuke
         /// </summary>
         public bool PlayedAlertSound = false;
 
-        public EntityUid? AlertAudioStream = default;
+        public IPlayingAudioStream? AlertAudioStream = default;
 
         /// <summary>
         ///     The radius from the nuke for which there must be floor tiles for it to be anchorable.
index 77689c4e2b1082a7a0fa273d98044f258fae0614..ca0b0e01137c3d55af7baf3019e79118b6ec6b4d 100644 (file)
@@ -14,7 +14,6 @@ using Content.Shared.Nuke;
 using Content.Shared.Popups;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
 using Robust.Shared.Player;
@@ -217,7 +216,7 @@ public sealed class NukeSystem : EntitySystem
 
     private void OnClearButtonPressed(EntityUid uid, NukeComponent component, NukeKeypadClearMessage args)
     {
-        _audio.PlayEntity(component.KeypadPressSound, Filter.Pvs(uid), uid, true);
+        _audio.Play(component.KeypadPressSound, Filter.Pvs(uid), uid, true);
 
         if (component.Status != NukeStatus.AWAIT_CODE)
             return;
@@ -335,12 +334,12 @@ public sealed class NukeSystem : EntitySystem
                 {
                     component.Status = NukeStatus.AWAIT_ARM;
                     component.RemainingTime = component.Timer;
-                    _audio.PlayEntity(component.AccessGrantedSound, Filter.Pvs(uid), uid, true);
+                    _audio.Play(component.AccessGrantedSound, Filter.Pvs(uid), uid, true);
                 }
                 else
                 {
                     component.EnteredCode = "";
-                    _audio.PlayEntity(component.AccessDeniedSound, Filter.Pvs(uid), uid, true);
+                    _audio.Play(component.AccessDeniedSound, Filter.Pvs(uid), uid, true);
                 }
 
                 break;
@@ -410,7 +409,7 @@ public sealed class NukeSystem : EntitySystem
         // Don't double-dip on the octave shifting
         component.LastPlayedKeypadSemitones = number == 0 ? component.LastPlayedKeypadSemitones : semitoneShift;
 
-        _audio.PlayEntity(component.KeypadPressSound, Filter.Pvs(uid), uid, true, AudioHelpers.ShiftSemitone(semitoneShift).WithVolume(-5f));
+        _audio.Play(component.KeypadPressSound, Filter.Pvs(uid), uid, true, AudioHelpers.ShiftSemitone(semitoneShift).WithVolume(-5f));
     }
 
     public string GenerateRandomNumberString(int length)
@@ -501,7 +500,7 @@ public sealed class NukeSystem : EntitySystem
 
         // disable sound and reset it
         component.PlayedAlertSound = false;
-        component.AlertAudioStream = _audio.Stop(component.AlertAudioStream);
+        component.AlertAudioStream?.Stop();
 
         // turn off the spinny light
         _pointLight.SetEnabled(uid, false);
index 7bd9b85c7913941cac567217bb2b4aeb7266fb88..61bb85f9ec12947c2f8c1fa1304cff303abd30fd 100644 (file)
@@ -83,7 +83,7 @@ public sealed partial class FatExtractorComponent : Component
     [DataField("processSound")]
     public SoundSpecifier? ProcessSound;
 
-    public EntityUid? Stream;
+    public IPlayingAudioStream? Stream;
 
     /// <summary>
     /// A minium hunger threshold for extracting nutrition.
index 1271c57a23cd07702a1a33bd68a37eb217f1159e..e8e456c0eafbef88e559979300fcb436424561fd 100644 (file)
@@ -9,9 +9,6 @@ using Content.Shared.Nutrition.AnimalHusbandry;
 using Content.Shared.Nutrition.Components;
 using Content.Shared.Nutrition.EntitySystems;
 using Content.Shared.Storage;
-using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
@@ -35,7 +32,6 @@ public sealed class AnimalHusbandrySystem : EntitySystem
     [Dependency] private readonly SharedTransformSystem _transform = default!;
 
     private readonly HashSet<EntityUid> _failedAttempts = new();
-    private readonly HashSet<EntityUid> _birthQueue = new();
 
     /// <inheritdoc/>
     public override void Initialize()
@@ -226,7 +222,7 @@ public sealed class AnimalHusbandrySystem : EntitySystem
     {
         base.Update(frameTime);
 
-        _birthQueue.Clear();
+        HashSet<EntityUid> birthQueue = new();
         _failedAttempts.Clear();
 
         var query = EntityQueryEnumerator<ReproductiveComponent>();
@@ -234,7 +230,7 @@ public sealed class AnimalHusbandrySystem : EntitySystem
         {
             if (reproductive.GestationEndTime != null && _timing.CurTime >= reproductive.GestationEndTime)
             {
-                _birthQueue.Add(uid);
+                birthQueue.Add(uid);
             }
 
             if (_timing.CurTime < reproductive.NextBreedAttempt)
@@ -248,7 +244,7 @@ public sealed class AnimalHusbandrySystem : EntitySystem
             TryReproduceNearby(uid, reproductive);
         }
 
-        foreach (var queued in _birthQueue)
+        foreach (var queued in birthQueue)
         {
             Birth(queued);
         }
index eebe7f98d868714b57238f450f7b8d45ad977da4..586f965096c7b516c9297dc9dea970db158e2784 100644 (file)
@@ -13,7 +13,6 @@ using Content.Shared.Throwing;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Nutrition.EntitySystems
@@ -38,7 +37,7 @@ namespace Content.Server.Nutrition.EntitySystems
 
         protected override void SplattedCreamPie(EntityUid uid, CreamPieComponent creamPie)
         {
-            _audio.PlayPvs(_audio.GetSound(creamPie.Sound), uid, AudioParams.Default.WithVariation(0.125f));
+            _audio.Play(_audio.GetSound(creamPie.Sound), Filter.Pvs(uid), uid, false, new AudioParams().WithVariation(0.125f));
 
             if (EntityManager.TryGetComponent(uid, out FoodComponent? foodComp))
             {
index 1829dc32c8f204ae411ae5c3b5b62408171fbe6a..e493a18ae70aaf154e56c0b4fded73fd5b7799f0 100644 (file)
@@ -27,7 +27,6 @@ using Content.Shared.Nutrition.Components;
 using Content.Shared.Throwing;
 using Content.Shared.Verbs;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
index 63ca590f5d60f0fd4b2b750b76cc9ae904ef9e81..6ab432d490224cc13945db1b085cc0ab6a99136d 100644 (file)
@@ -10,8 +10,6 @@ using Content.Shared.Emag.Systems;
 using Content.Shared.Nutrition.Components;
 using Content.Shared.Nutrition.EntitySystems;
 using Content.Shared.Storage.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Timing;
 
 namespace Content.Server.Nutrition.EntitySystems;
@@ -92,7 +90,7 @@ public sealed class FatExtractorSystem : EntitySystem
 
         component.Processing = true;
         _appearance.SetData(uid, FatExtractorVisuals.Processing, true);
-        component.Stream = _audio.PlayPvs(component.ProcessSound, uid)?.Entity;
+        component.Stream = _audio.PlayPvs(component.ProcessSound, uid);
         component.NextUpdate = _timing.CurTime + component.UpdateTime;
     }
 
@@ -106,7 +104,7 @@ public sealed class FatExtractorSystem : EntitySystem
 
         component.Processing = false;
         _appearance.SetData(uid, FatExtractorVisuals.Processing, false);
-        component.Stream = _audio.Stop(component.Stream);
+        component.Stream?.Stop();
     }
 
     public bool TryGetValidOccupant(EntityUid uid, [NotNullWhen(true)] out EntityUid? occupant, FatExtractorComponent? component = null, EntityStorageComponent? storage = null)
index 7bb550725f9d11ea4e90174c3936be84267f7341..ff4ec41dd99ceeec2fdbc88ebdb108b22f24b975 100644 (file)
@@ -28,9 +28,6 @@ using Content.Shared.Verbs;
 using Robust.Shared.Audio;
 using Robust.Shared.Player;
 using Robust.Shared.Utility;
-using Content.Shared.Tag;
-using Content.Shared.Storage;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Nutrition.EntitySystems;
 
@@ -281,7 +278,7 @@ public sealed class FoodSystem : EntitySystem
             _adminLogger.Add(LogType.Ingestion, LogImpact.Low, $"{ToPrettyString(args.User):target} ate {ToPrettyString(uid):food}");
         }
 
-        _audio.PlayPvs(component.UseSound, args.Target.Value, AudioParams.Default.WithVolume(-1f));
+        _audio.Play(component.UseSound, Filter.Pvs(args.Target.Value), args.Target.Value, true, AudioParams.Default.WithVolume(-1f));
 
         // Try to break all used utensils
         foreach (var utensil in utensils)
index fbe617eff49c9bd1d33ca6fd0b4fb5039332dff5..dd6474bc74e7a116c71d7a4514fea490b34f6df2 100644 (file)
@@ -7,8 +7,6 @@ using Content.Shared.Interaction.Events;
 using Content.Shared.Nutrition.Components;
 using Content.Shared.Popups;
 using Content.Shared.Weapons.Melee.Events;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.GameObjects;
 
 namespace Content.Server.Nutrition.EntitySystems;
index 9d255e013cd59e34d36a221ef012e5c04f762f04..88916e4cf2c31ab1cc3da182447728d72a3accdf 100644 (file)
@@ -7,18 +7,16 @@ using Content.Shared.FixedPoint;
 using Content.Shared.Hands.EntitySystems;
 using Content.Shared.Interaction;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Player;
 
 namespace Content.Server.Nutrition.EntitySystems
 {
-    public sealed class SliceableFoodSystem : EntitySystem
+    internal sealed class SliceableFoodSystem : EntitySystem
     {
         [Dependency] private readonly SolutionContainerSystem _solutionContainerSystem = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
-        [Dependency] private readonly SharedContainerSystem _containerSystem = default!;
         [Dependency] private readonly SharedHandsSystem _handsSystem = default!;
+        [Dependency] private readonly SharedContainerSystem _containerSystem = default!;
 
         public override void Initialize()
         {
@@ -77,7 +75,8 @@ namespace Content.Server.Nutrition.EntitySystems
                 xform.LocalRotation = 0;
             }
 
-            _audio.PlayPvs(component.Sound, transform.Coordinates, AudioParams.Default.WithVolume(-2));
+            SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(uid),
+                transform.Coordinates, AudioParams.Default.WithVolume(-2));
 
             // Decrease size of item based on count - Could implement in the future
             // Bug with this currently is the size in a container is not updated
index f5f34080cbb0aa0edea96da4cf4403ca07baedad..0f1576658bd314681eb467dce5c9de0bab310c4d 100644 (file)
@@ -2,7 +2,6 @@ using Content.Server.Nutrition.Components;
 using Content.Server.Popups;
 using Content.Shared.Interaction;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
 
@@ -16,7 +15,6 @@ namespace Content.Server.Nutrition.EntitySystems
         [Dependency] private readonly IRobustRandom _robustRandom = default!;
         [Dependency] private readonly FoodSystem _foodSystem = default!;
         [Dependency] private readonly PopupSystem _popupSystem = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
         [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
 
         public override void Initialize()
@@ -68,8 +66,8 @@ namespace Content.Server.Nutrition.EntitySystems
 
             if (_robustRandom.Prob(component.BreakChance))
             {
-                _audio.PlayPvs(component.BreakSound, userUid, AudioParams.Default.WithVolume(-2f));
-                EntityManager.DeleteEntity(uid);
+                SoundSystem.Play(component.BreakSound.GetSound(), Filter.Pvs(userUid), userUid, AudioParams.Default.WithVolume(-2f));
+                EntityManager.DeleteEntity(component.Owner);
             }
         }
     }
index f8aadac461de965b200b9153cbc95e7d3663a70d..7494d5e12ceffbf6e3fb4e41fa5076ee347e93eb 100644 (file)
@@ -13,8 +13,6 @@ using Robust.Shared.Player;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
-using System.Linq;
-using Robust.Server.Audio;
 
 namespace Content.Server.PDA.Ringer
 {
@@ -205,7 +203,7 @@ namespace Content.Server.PDA.Ringer
                 ringer.TimeElapsed -= NoteDelay;
                 var ringerXform = Transform(uid);
 
-                _audio.PlayEntity(
+                _audio.Play(
                     GetSound(ringer.Ringtone[ringer.NoteCount]),
                     Filter.Empty().AddInRange(ringerXform.MapPosition, ringer.Range),
                     uid,
index 571d7aefc92fdb685139c0a86aeddb1ecfe5237e..553bcaa0a217541d430f9c93de291c9171697bc8 100644 (file)
@@ -9,9 +9,6 @@ using Content.Shared.Paper;
 using Content.Shared.Tag;
 using Robust.Server.GameObjects;
 using Robust.Shared.Player;
-using Robust.Shared.Utility;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using static Content.Shared.Paper.SharedPaperComponent;
 
 namespace Content.Server.Paper
index d4175a1af554e0289010ff06fefa64b2c6f0e0ff..d52223e2b4ec8247699848ca8a15093a1c537942 100644 (file)
@@ -2,7 +2,6 @@
 using Content.Shared.Interaction.Events;
 using Content.Shared.Pinpointer;
 using Content.Shared.PowerCell;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Timing;
 
index 09571c60a1309699458a1439864feeff996f30bb..91e544b7960e94c2341b897dcafc198056e4058d 100644 (file)
@@ -5,16 +5,14 @@ using Content.Server.Storage.EntitySystems;
 using Content.Shared.Audio;
 using Content.Shared.Interaction;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Plants.Systems
 {
     public sealed class PottedPlantHideSystem : EntitySystem
     {
-        [Dependency] private readonly PopupSystem _popupSystem = default!;
         [Dependency] private readonly SecretStashSystem _stashSystem = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
+        [Dependency] private readonly PopupSystem _popupSystem = default!;
 
         public override void Initialize()
         {
@@ -60,7 +58,7 @@ namespace Content.Server.Plants.Systems
             if (!Resolve(uid, ref component))
                 return;
 
-            _audio.PlayPvs(component.RustleSound, uid, AudioParams.Default.WithVariation(0.25f));
+            SoundSystem.Play(component.RustleSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.25f));
         }
     }
 }
index b5f94d097ed6a335afbb76689c73970c37490da7..a71294db9d23aaf339fc3d1213d2a3adc0904afe 100644 (file)
@@ -25,7 +25,7 @@ public sealed class PointSystem : SharedPointSystem
 
     private void OnStartup(EntityUid uid, PointManagerComponent component, ComponentStartup args)
     {
-        _pvsOverride.AddGlobalOverride(GetNetEntity(uid));
+        _pvsOverride.AddGlobalOverride(uid);
     }
 
     /// <summary>
index 5531f65409c3817d9837a7905ad30e8a9bf06239..fbf4961f4fd760c8226666dd13d95d200812c90c 100644 (file)
@@ -15,7 +15,6 @@ using Content.Shared.Mobs.Systems;
 using Content.Shared.Polymorph;
 using Content.Shared.Popups;
 using JetBrains.Annotations;
-using Robust.Server.Audio;
 using Robust.Server.Containers;
 using Robust.Server.GameObjects;
 using Robust.Shared.Map;
index 95b5d74a94575382fe8f58cfd55107573f5b2b6b..8d9a62cd73d822532d6ff6120dd5c6d4d944c15b 100644 (file)
@@ -10,7 +10,6 @@ using Content.Shared.Emag.Systems;
 using Content.Shared.Popups;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Timing;
 
 namespace Content.Server.Power.EntitySystems;
index 5ed39d51787ebd5d6e906507140f37793be6e48f..f1f8bf06168db4929ebf95d6e1b74e8dc19972da 100644 (file)
@@ -7,7 +7,6 @@ using Content.Shared.Examine;
 using Content.Shared.Hands.Components;
 using Content.Shared.Power;
 using Content.Shared.Verbs;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
 using Robust.Shared.Utility;
index 031e19b65dc8a2da24a36ff9ac89591b77cbe947..1180665ad12e212313e4c749330aeaa4ce14f6f8 100644 (file)
@@ -3,7 +3,6 @@ using Content.Server.Popups;
 using Content.Shared.DoAfter;
 using Content.Shared.Power.Generator;
 using Content.Shared.Verbs;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
@@ -98,7 +97,7 @@ public sealed class PortableGeneratorSystem : SharedPortableGeneratorSystem
         var clogged = _generator.GetIsClogged(uid);
 
         var sound = empty ? component.StartSoundEmpty : component.StartSound;
-        _audio.PlayEntity(sound, Filter.Pvs(uid), uid, true);
+        _audio.Play(sound, Filter.Pvs(uid), uid, true);
 
         if (!clogged && !empty && _random.Prob(component.StartChance))
         {
index 7c377ef66ed4fc44abdbbc2b6b00c6c2b1a49045..ae7960cf8f01093022d728092d34948797055d39 100644 (file)
@@ -6,7 +6,8 @@ using Content.Server.Power.Nodes;
 using Content.Shared.Power.Generator;
 using Content.Shared.Timing;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio.Systems;
+using Robust.Server.GameObjects;
+using Robust.Shared.Player;
 using Robust.Shared.Utility;
 
 namespace Content.Server.Power.Generator;
@@ -19,9 +20,9 @@ namespace Content.Server.Power.Generator;
 /// <seealso cref="GeneratorSystem"/>
 public sealed class PowerSwitchableSystem : SharedPowerSwitchableSystem
 {
+    [Dependency] private readonly AudioSystem _audio = default!;
     [Dependency] private readonly NodeGroupSystem _nodeGroup = default!;
     [Dependency] private readonly PopupSystem _popup = default!;
-    [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly UseDelaySystem _useDelay = default!;
 
     public override void Initialize()
index deb669350006725e6543e11a9500e7f2ba9a7d87..e5a118b07e4efa2ffc60d8bd5ba98d88839a5e60 100644 (file)
@@ -6,7 +6,6 @@ using Content.Server.Chat.Systems;
 using Content.Server.Station.Systems;
 using Robust.Shared.Timing;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.PowerSink
 {
index f889336a0681e04fdb538775c5b74374af1082a4..3a2fe1254927f02bb367b4cf578d10acd0b28aa8 100644 (file)
@@ -5,7 +5,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Inventory.Events;
 using Content.Shared.Radiation.Components;
 using Content.Shared.Radiation.Systems;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Server.Player;
 
@@ -150,7 +149,7 @@ public sealed class GeigerSystem : SharedGeigerSystem
         if (!Resolve(uid, ref component, false))
             return;
 
-        component.Stream = _audio.Stop(component.Stream);
+        component.Stream?.Stop();
 
         if (!component.Sounds.TryGetValue(component.DangerLevel, out var sounds))
             return;
@@ -164,7 +163,7 @@ public sealed class GeigerSystem : SharedGeigerSystem
         var sound = _audio.GetSound(sounds);
         var param = sounds.Params.WithLoop(true).WithVolume(-4f);
 
-        component.Stream = _audio.PlayGlobal(sound, session, param)?.Entity;
+        component.Stream = _audio.PlayGlobal(sound, session, param);
     }
 
     public static GeigerDangerLevel RadsToLevel(float rads)
index 8a65e0a8bc770caa07cdb9fada1c1126b7e268ab..0d60f0af4fee59fdef9e0555d29b8d4381b8cf99 100644 (file)
@@ -3,7 +3,6 @@ using Content.Server.Research.TechnologyDisk.Components;
 using Content.Server.UserInterface;
 using Content.Shared.Research;
 using Content.Shared.Research.Components;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 using Robust.Shared.Timing;
 
index 5068a1a232f5372ca8d8b5f9ceb790e80ca4b638..6043f3fbf92ff2f3d135972ae096217b4f4386aa 100644 (file)
@@ -11,7 +11,6 @@ using Content.Server.Station.Systems;
 using Content.Shared.Database;
 using Content.Shared.GameTicking;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
@@ -34,7 +33,6 @@ namespace Content.Server.RoundEnd
         [Dependency] private readonly ChatSystem _chatSystem = default!;
         [Dependency] private readonly GameTicker _gameTicker = default!;
         [Dependency] private readonly EmergencyShuttleSystem _shuttle = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
         [Dependency] private readonly StationSystem _stationSystem = default!;
 
         public TimeSpan DefaultCooldownDuration { get; set; } = TimeSpan.FromSeconds(30);
@@ -156,7 +154,7 @@ namespace Content.Server.RoundEnd
                 null,
                 Color.Gold);
 
-            _audio.PlayGlobal("/Audio/Announcements/shuttlecalled.ogg", Filter.Broadcast(), true);
+            SoundSystem.Play("/Audio/Announcements/shuttlecalled.ogg", Filter.Broadcast());
 
             LastCountdownStart = _gameTiming.CurTime;
             ExpectedCountdownEnd = _gameTiming.CurTime + countdownTime;
@@ -187,7 +185,7 @@ namespace Content.Server.RoundEnd
             _chatSystem.DispatchGlobalAnnouncement(Loc.GetString("round-end-system-shuttle-recalled-announcement"),
                 Loc.GetString("Station"), false, colorOverride: Color.Gold);
 
-            _audio.PlayGlobal("/Audio/Announcements/shuttlerecalled.ogg", Filter.Broadcast(), true);
+            SoundSystem.Play("/Audio/Announcements/shuttlerecalled.ogg", Filter.Broadcast());
 
             LastCountdownStart = null;
             ExpectedCountdownEnd = null;
index 6d3d831a2dab2cd6cdd34c78c5e02b377bc0be7a..2bc00397bc9bf80edd6c95fac35feaa658d208f4 100644 (file)
@@ -39,7 +39,7 @@ public sealed partial class SalvageExpeditionComponent : SharedSalvageExpedition
     /// <summary>
     /// Countdown audio stream.
     /// </summary>
-    public EntityUid? Stream = null;
+    public IPlayingAudioStream? Stream = null;
 
     /// <summary>
     /// Sound that plays when the mission end is imminent.
index f0d4661a070966a091fd5dd878e58a7a26c6771f..f2be8cd5008ce3538fcd7f02b65c8fac2c8bb47e 100644 (file)
@@ -73,7 +73,7 @@ public sealed partial class SalvageSystem
 
     private void OnExpeditionShutdown(EntityUid uid, SalvageExpeditionComponent component, ComponentShutdown args)
     {
-        component.Stream = _audio.Stop(component.Stream);
+        component.Stream?.Stop();
 
         foreach (var (job, cancelToken) in _salvageJobs.ToArray())
         {
index 3b89135c58e55c7a32885d3a849e3d7bad902f2c..0863362131cc510ccb845f07a921f25e5e2ae129 100644 (file)
@@ -153,7 +153,7 @@ public sealed partial class SalvageSystem
             else if (comp.Stage < ExpeditionStage.MusicCountdown && remaining < TimeSpan.FromMinutes(2))
             {
                 // TODO: Some way to play audio attached to a map for players.
-                comp.Stream = _audio.PlayGlobal(comp.Sound, Filter.BroadcastMap(Comp<MapComponent>(uid).MapId), true).Value.Entity;
+                comp.Stream = _audio.PlayGlobal(comp.Sound, Filter.BroadcastMap(Comp<MapComponent>(uid).MapId), true);
                 comp.Stage = ExpeditionStage.MusicCountdown;
                 Dirty(uid, comp);
                 Announce(uid, Loc.GetString("salvage-expedition-announcement-countdown-minutes", ("duration", TimeSpan.FromMinutes(2).Minutes)));
index eb98e1f2e1fc34bbf3ac6b66e3b920f48a0bbda4..0da6207289846136b45399eddcd36a8ca11dafea 100644 (file)
@@ -27,8 +27,6 @@ using Content.Shared.Random;
 using Content.Shared.Random.Helpers;
 using Content.Shared.Tools.Components;
 using Robust.Server.Maps;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map.Components;
 using Robust.Shared.Timing;
 
index 105b9eae6d727b738c8e47fe3ed5b12c3e27084c..43b702cd39bd15f99a44d1961aa7bc191dadddc4 100644 (file)
@@ -51,5 +51,5 @@ public sealed partial class FTLComponent : Component
         Params = AudioParams.Default.WithVolume(-3f).WithLoop(true)
     };
 
-    public EntityUid? TravelStream;
+    public IPlayingAudioStream? TravelStream;
 }
index 0f2b8b847c7b85eb4835de3fde5b92e110554556..3ef3d97a21aa6e350b43c8399936add84b1459cf 100644 (file)
@@ -20,9 +20,6 @@ using Content.Shared.Tag;
 using Content.Shared.Tiles;
 using Robust.Server.GameObjects;
 using Robust.Server.Maps;
-using Robust.Server.Player;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
index 3fe5c2b1edfcdcfc5c2aed43639aa0c8c63ff434..e19d88b1c29589e8abe45c96e2f027b4a6556199 100644 (file)
@@ -227,7 +227,8 @@ public sealed partial class ShuttleSystem
 
         component = AddComp<FTLComponent>(uid);
         component.State = FTLState.Starting;
-        _audio.PlayPvs(_startupSound, uid);
+        // TODO: Need BroadcastGrid to not be bad.
+        SoundSystem.Play(_startupSound.GetSound(), Filter.Empty().AddInRange(Transform(uid).MapPosition, GetSoundRange(uid)), _startupSound.Params);
         // Make sure the map is setup before we leave to avoid pop-in (e.g. parallax).
         SetupHyperspace();
         return true;
@@ -283,8 +284,11 @@ public sealed partial class ShuttleSystem
                     var ev = new FTLStartedEvent(uid, target, fromMapUid, fromMatrix, fromRotation);
                     RaiseLocalEvent(uid, ref ev, true);
 
-                    comp.TravelStream = _audio.PlayPvs(comp.TravelSound, uid)?.Entity;
-
+                    if (comp.TravelSound != null)
+                    {
+                        comp.TravelStream = SoundSystem.Play(comp.TravelSound.GetSound(),
+                            Filter.Pvs(uid, 4f, entityManager: EntityManager), comp.TravelSound.Params);
+                    }
                     break;
                 // Arriving, play effects
                 case FTLState.Travelling:
@@ -370,8 +374,13 @@ public sealed partial class ShuttleSystem
                         _thruster.DisableLinearThrusters(shuttle);
                     }
 
-                    comp.TravelStream = _audio.Stop(comp.TravelStream);
-                    _audio.PlayPvs(_arrivalSound, uid);
+                    if (comp.TravelStream != null)
+                    {
+                        comp.TravelStream?.Stop();
+                        comp.TravelStream = null;
+                    }
+
+                    _audio.PlayGlobal(_arrivalSound, Filter.Empty().AddInRange(Transform(uid).MapPosition, GetSoundRange(uid)), true);
 
                     if (TryComp<FTLDestinationComponent>(uid, out var dest))
                     {
index f346398cdaaab3c3efacef785a71908194fcb526..73dc4b208c2fb1d613ca19283ebe86df96b58647 100644 (file)
@@ -54,6 +54,6 @@ public sealed partial class ShuttleSystem
         var volume = MathF.Min(10f, 1f * MathF.Pow(jungleDiff, 0.5f) - 5f);
         var audioParams = AudioParams.Default.WithVariation(SharedContentAudioSystem.DefaultVariation).WithVolume(volume);
 
-        _audio.PlayPvs(_shuttleImpactSound, coordinates, audioParams);
+        _audio.Play(_shuttleImpactSound, Filter.Pvs(coordinates, rangeMultiplier: 4f, entityMan: EntityManager), coordinates, true, audioParams);
     }
 }
index cbd36f12b77277c42fe8c2d567a154026ba1780c..41e4cbc2be92431bebd0f3d9c26e1ae0aaea17a8 100644 (file)
@@ -9,8 +9,6 @@ using Content.Shared.Shuttles.Systems;
 using Content.Shared.Throwing;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
index 6b4347740ae9ab73124babd8ed85c764390c80ab..ddc63156bf0525dcf1eb38b8fc0b0089bd8da3e7 100644 (file)
@@ -5,8 +5,6 @@ using Content.Shared.Singularity.Components;
 using Content.Shared.Singularity.EntitySystems;
 using Content.Shared.Singularity.Events;
 using Robust.Server.GameStates;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.GameStates;
 using Robust.Shared.Player;
 using Robust.Shared.Timing;
@@ -206,9 +204,9 @@ public sealed class SingularitySystem : SharedSingularitySystem
 
         MetaDataComponent? metaData = null;
         if (Resolve(uid, ref metaData) && metaData.EntityLifeStage <= EntityLifeStage.Initializing)
-            _audio.PlayPvs(comp.FormationSound, uid);
+            _audio.Play(comp.FormationSound, Filter.Pvs(uid), uid, true);
 
-        comp.AmbientSoundStream = _audio.PlayPvs(comp.AmbientSound, uid)?.Entity;
+        comp.AmbientSoundStream = _audio.Play(comp.AmbientSound, Filter.Pvs(uid), uid, true);
         UpdateSingularityLevel(uid, comp);
     }
 
@@ -221,7 +219,7 @@ public sealed class SingularitySystem : SharedSingularitySystem
     /// <param name="args">The event arguments.</param>
     public void OnDistortionStartup(EntityUid uid, SingularityDistortionComponent comp, ComponentStartup args)
     {
-        _pvs.AddGlobalOverride(GetNetEntity(uid));
+        _pvs.AddGlobalOverride(uid);
     }
 
     /// <summary>
@@ -234,18 +232,11 @@ public sealed class SingularitySystem : SharedSingularitySystem
     /// <param name="args">The event arguments.</param>
     public void OnSingularityShutdown(EntityUid uid, SingularityComponent comp, ComponentShutdown args)
     {
-        comp.AmbientSoundStream = _audio.Stop(comp.AmbientSoundStream);
+        comp.AmbientSoundStream?.Stop();
 
         MetaDataComponent? metaData = null;
         if (Resolve(uid, ref metaData) && metaData.EntityLifeStage >= EntityLifeStage.Terminating)
-        {
-            var xform = Transform(uid);
-            var coordinates = xform.Coordinates;
-
-            // I feel like IsValid should be checking this or something idk.
-            if (!TerminatingOrDeleted(coordinates.EntityId))
-                _audio.PlayPvs(comp.DissipationSound, coordinates);
-        }
+            _audio.Play(comp.DissipationSound, Filter.Pvs(uid), uid, true);
     }
 
     /// <summary>
index aedcbbd09960b4dc53a2d4bfd564443e649a5fbd..5dccb8bf9cc417840e9d85e67a281fb39b854043 100644 (file)
@@ -4,8 +4,6 @@ using Content.Server.Speech.Components;
 using Content.Shared.Chat.Prototypes;
 using Content.Shared.Humanoid;
 using Content.Shared.Speech;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 
index 4f66a0828bd412af5c5f02164b784bb33e489e76..c81d17caf2dcc7ddff95980f6c98ac1e2a5eb0f1 100644 (file)
@@ -2,7 +2,6 @@ using Robust.Shared.Audio;
 using Content.Server.Chat;
 using Content.Server.Chat.Systems;
 using Content.Shared.Speech;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Timing;
@@ -15,7 +14,6 @@ namespace Content.Server.Speech
         [Dependency] private readonly IGameTiming _gameTiming = default!;
         [Dependency] private readonly IPrototypeManager _protoManager = default!;
         [Dependency] private readonly IRobustRandom _random = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
 
         public override void Initialize()
         {
@@ -68,7 +66,7 @@ namespace Content.Server.Speech
             var pitchedAudioParams = component.AudioParams.WithPitchScale(scale);
 
             component.LastTimeSoundPlayed = currentTime;
-            _audio.PlayPvs(contextSound, uid, pitchedAudioParams);
+            SoundSystem.Play(contextSound, Filter.Pvs(uid, entityManager: EntityManager), uid, pitchedAudioParams);
         }
     }
 }
index fd8ff9ea280412c3e492a4603e44a3480476f07a..763b7697d3443e09c8437edb9b3b51c76653bc98 100644 (file)
@@ -11,8 +11,6 @@ using Content.Shared.SprayPainter;
 using Content.Shared.Interaction;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.SprayPainter;
index 537a7e7c2216094be2fe48aec915d02141be0492..41a7b153f58c0c21eb122c539cd8fb781eaf759f 100644 (file)
@@ -8,8 +8,6 @@ using Content.Server.Station.Components;
 using Content.Server.Station.Systems;
 using Content.Server.StationEvents.Components;
 using Content.Shared.Database;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Collections;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
index a8144311bbf2953fc96565a1df87759eb680b5a9..f51c215c6e43a344c8854aa04d8c04a5dce0b337 100644 (file)
@@ -5,9 +5,6 @@ using Content.Shared.Storage.Components;
 using Robust.Shared.Audio;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
-using System.Linq;
-using Content.Shared.Storage.Components;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Storage.EntitySystems;
 
@@ -15,7 +12,6 @@ public sealed class CursedEntityStorageSystem : EntitySystem
 {
     [Dependency] private readonly IRobustRandom _random = default!;
     [Dependency] private readonly EntityStorageSystem _entityStorage = default!;
-    [Dependency] private readonly SharedAudioSystem _audio = default!;
 
     public override void Initialize()
     {
@@ -51,7 +47,6 @@ public sealed class CursedEntityStorageSystem : EntitySystem
             storage.Contents.Remove(entity);
             _entityStorage.AddToContents(entity, lockerEnt);
         }
-
-        _audio.PlayPvs(component.CursedSound, uid, AudioHelpers.WithVariation(0.125f, _random));
+        SoundSystem.Play(component.CursedSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f, _random));
     }
 }
index c49bfdec9317459e24edbd46fcea487e223307c4..25c31e48ca65bb9ab40449c606a412d2a5f565b0 100644 (file)
@@ -5,7 +5,6 @@ using Content.Shared.Database;
 using Content.Shared.Hands.EntitySystems;
 using Content.Shared.Interaction.Events;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
@@ -19,7 +18,6 @@ namespace Content.Server.Storage.EntitySystems
         [Dependency] private readonly IAdminLogManager _adminLogger = default!;
         [Dependency] private readonly SharedHandsSystem _hands = default!;
         [Dependency] private readonly PricingSystem _pricing = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
 
         public override void Initialize()
         {
@@ -81,9 +79,7 @@ namespace Content.Server.Storage.EntitySystems
             }
 
             if (component.Sound != null)
-            {
-                _audio.PlayPvs(component.Sound, uid);
-            }
+                SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(uid), uid);
 
             component.Uses--;
 
index 35b94b2d6da5064a815678099116c1a2e5c85fad..8b4ae1c76f9f4fd42b8570ebfa467179da72f92a 100644 (file)
@@ -93,7 +93,7 @@ public sealed partial class StorageSystem : SharedStorageSystem
             UpdateStorageVisualization(uid, storageComp);
 
             if (storageComp.StorageCloseSound is not null)
-                Audio.PlayEntity(storageComp.StorageCloseSound, Filter.Pvs(uid, entityManager: EntityManager), uid, true, storageComp.StorageCloseSound.Params);
+                Audio.Play(storageComp.StorageCloseSound, Filter.Pvs(uid, entityManager: EntityManager), uid, true, storageComp.StorageCloseSound.Params);
         }
     }
 
index 32c9a050435bedbadf8805a2e8b4bc82685b401d..0435a6bea60886a6c64c996bdba7fb2ccd178af5 100644 (file)
@@ -10,8 +10,6 @@ using Content.Shared.FixedPoint;
 using Content.Shared.Hands.EntitySystems;
 using Content.Shared.Store;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Store.Systems;
index da2391a86baadef7585e4ea1a829e69763aee8e3..f4a7448fa24fb00baab66d80d3d288996332a813 100644 (file)
@@ -13,7 +13,6 @@ using Content.Shared.Stunnable;
 using Content.Shared.Toggleable;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 
 namespace Content.Server.Stunnable.Systems
@@ -25,7 +24,7 @@ namespace Content.Server.Stunnable.Systems
         [Dependency] private readonly RiggableSystem _riggableSystem = default!;
         [Dependency] private readonly SharedPopupSystem _popup = default!;
         [Dependency] private readonly BatterySystem _battery = default!;
-        [Dependency] private readonly SharedAudioSystem _audio = default!;
+        [Dependency] private readonly AudioSystem _audio = default!;
 
         public override void Initialize()
         {
@@ -98,6 +97,7 @@ namespace Content.Server.Stunnable.Systems
 
         private void TurnOn(EntityUid uid, StunbatonComponent comp, EntityUid user)
         {
+
             if (comp.Activated)
                 return;
 
index ce3d8568ab3b77aa5f0df11c7d0d7c110ba4f186..d40303ab31f4e4d67d1aba37e718edfd8cdb810a 100644 (file)
@@ -1,7 +1,5 @@
 using Content.Server.Chat.Systems;
 using Content.Shared.Speech;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
index 29cde5d741d66da80189abde970666b2e2eb0181..4bfe03ba4221c71c9aa73cb1589e5282b56a8e1a 100644 (file)
@@ -4,7 +4,6 @@ using Content.Shared.Database;
 using Content.Shared.Interaction.Events;
 using Content.Shared.Teleportation.Components;
 using Content.Shared.Teleportation.Systems;
-using Robust.Server.Audio;
 using Robust.Server.GameObjects;
 
 namespace Content.Server.Teleportation;
index 8bf8457e075b3e39b199fc03a0eb2800e6dee8a4..b10feae4533e04249c039cc5a04d8cf36c8a93d8 100644 (file)
@@ -17,7 +17,6 @@ using Content.Shared.Tools;
 using Content.Shared.Tools.Components;
 using Content.Shared.Verbs;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
 using SharedToolSystem = Content.Shared.Tools.Systems.SharedToolSystem;
index de6a7fefc1265763ebdb3cfc6a56196f509f7cf6..88a96dc1e8daaf9af95b741287313ed64769d274 100644 (file)
@@ -5,8 +5,6 @@ using Content.Shared.Chemistry.EntitySystems;
 using Content.Shared.Maps;
 using Content.Shared.Tools;
 using Robust.Server.GameObjects;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using SharedToolSystem = Content.Shared.Tools.Systems.SharedToolSystem;
 
index 45c6a3d9d5572a4ce008702d8c0eb6c43bff2a11..d7864ba16c8e66fdd1d83fe4371b865b82a5daf0 100644 (file)
@@ -4,8 +4,6 @@ using Content.Shared.IdentityManagement;
 using Content.Shared.Popups;
 using Content.Shared.Tag;
 using Content.Shared.Weapons.Melee.Events;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Weapons.Melee.Balloon;
 
index ca2a367d9b4054b85e41f4733d08bf0116befb04..fcd42f5a2884a4ea90a5c92b396e8bfdc8067211 100644 (file)
@@ -12,8 +12,6 @@ using Content.Shared.Weapons.Melee;
 using Content.Shared.Weapons.Melee.Events;
 using Content.Shared.Wieldable;
 using Content.Shared.Wieldable.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
 
@@ -118,7 +116,7 @@ public sealed class EnergySwordSystem : EntitySystem
         if (comp.IsSharp)
             RemComp<SharpComponent>(uid);
 
-        _audio.PlayEntity(comp.DeActivateSound, Filter.Pvs(uid, entityManager: EntityManager), uid, true, comp.DeActivateSound.Params);
+        _audio.Play(comp.DeActivateSound, Filter.Pvs(uid, entityManager: EntityManager), uid, true, comp.DeActivateSound.Params);
 
         comp.Activated = false;
     }
@@ -145,7 +143,7 @@ public sealed class EnergySwordSystem : EntitySystem
             malus.Malus += comp.LitDisarmMalus;
         }
 
-        _audio.PlayEntity(comp.ActivateSound, Filter.Pvs(uid, entityManager: EntityManager), uid, true, comp.ActivateSound.Params);
+        _audio.Play(comp.ActivateSound, Filter.Pvs(uid, entityManager: EntityManager), uid, true, comp.ActivateSound.Params);
 
         comp.Activated = true;
     }
index 8cb22ca8bdb2958d4734daf0b7b9e992e4ad8fc5..6236040a839ae3b47ddb7cf77485592d27fcc778 100644 (file)
@@ -1,8 +1,6 @@
 using Content.Shared.Weapons.Melee.Events;
 using Robust.Shared.Random;
 using Content.Shared.Cluwne;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Weapons.Melee.WeaponRandom;
 
index cb019e3d64a69faffdbe721290fd61dfa53b6fc1..b6452efa8a6f03714d72eb6663a051e96ad7176d 100644 (file)
@@ -16,9 +16,6 @@ using Content.Shared.Tools;
 using Content.Shared.Tools.Components;
 using Content.Shared.Wires;
 using Robust.Server.GameObjects;
-using Robust.Server.Player;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
index 63095c7827013bef8425dd2ebd0d3c1c3e1410c6..9200928d662459b66e09483b73c01cde93ca1564 100644 (file)
@@ -18,7 +18,6 @@ using Content.Shared.Xenoarchaeology.XenoArtifacts;
 using JetBrains.Annotations;
 using Robust.Server.GameObjects;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
index b8b2fba9d3330fcc1414eff77415e7563265ba1d..0791924caaf351d156a1f2d6c4a7e66cd771a0ac 100644 (file)
@@ -9,8 +9,6 @@ using Content.Server.Xenoarchaeology.XenoArtifacts.Triggers.Components;
 using Content.Shared.CCVar;
 using Content.Shared.Xenoarchaeology.XenoArtifacts;
 using JetBrains.Annotations;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
index 662abfee62889b7e15fa407374821ab97dd5c7aa..ba2786f32d33d28187e9699189d378593fb91ab4 100644 (file)
@@ -3,7 +3,6 @@ using Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Components;
 using Content.Server.Xenoarchaeology.XenoArtifacts.Events;
 using Content.Shared.Humanoid;
 using Content.Shared.Mobs.Systems;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Xenoarchaeology.XenoArtifacts.Effects.Systems;
 
index f35adf1294d62db67be83effb2321b311246c4fb..3014edd1b9ae44c81ed2118361993fd9718f33ab 100644 (file)
@@ -32,7 +32,6 @@ using Content.Shared.Weapons.Melee;
 using Content.Shared.Zombies;
 using Robust.Shared.Audio;
 using Content.Shared.Prying.Components;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Server.Zombies
 {
index 8750089764972dda46532751aec976fd19ea9694..00a17ace250988b5284707624f29cfaee4434734 100644 (file)
@@ -7,8 +7,6 @@ using Content.Shared.Database;
 using Content.Shared.Hands;
 using Content.Shared.Interaction;
 using Content.Shared.Inventory.Events;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.GameStates;
 using Robust.Shared.Map;
index e2218091cefef9812f1a0e8099e4ce02b54da2e3..4b2b3ada70aea7e4b13f6dab3e68545891285bfb 100644 (file)
@@ -5,8 +5,6 @@ using Content.Shared.Database;
 using Content.Shared.Interaction;
 using Content.Shared.Popups;
 using Content.Shared.Weapons.Melee.Events;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Network;
 using Robust.Shared.Random;
 using Robust.Shared.Timing;
index 6318ba2557316deeea8f68f961d35acb4fc96a0c..30fdc946edd56252a945f8f13e9fb6d60fc28fc0 100644 (file)
@@ -19,7 +19,7 @@ public abstract class SharedAmbientSoundSystem : EntitySystem
 
         ambience.Enabled = value;
         QueueUpdate(uid, ambience);
-        Dirty(uid, ambience);
+        Dirty(ambience);
     }
 
     public virtual void SetRange(EntityUid uid, float value, AmbientSoundComponent? ambience = null)
@@ -29,7 +29,7 @@ public abstract class SharedAmbientSoundSystem : EntitySystem
 
         ambience.Range = value;
         QueueUpdate(uid, ambience);
-        Dirty(uid, ambience);
+        Dirty(ambience);
     }
 
     protected virtual void QueueUpdate(EntityUid uid, AmbientSoundComponent ambience)
@@ -43,7 +43,7 @@ public abstract class SharedAmbientSoundSystem : EntitySystem
             return;
 
         ambience.Volume = value;
-        Dirty(uid, ambience);
+        Dirty(ambience);
     }
 
     public virtual void SetSound(EntityUid uid, SoundSpecifier sound, AmbientSoundComponent? ambience = null)
@@ -53,7 +53,7 @@ public abstract class SharedAmbientSoundSystem : EntitySystem
 
         ambience.Sound = sound;
         QueueUpdate(uid, ambience);
-        Dirty(uid, ambience);
+        Dirty(ambience);
     }
 
     private void HandleCompState(EntityUid uid, AmbientSoundComponent component, ref ComponentHandleState args)
index 3563f2f8462bebadfefedd36cd26fdce409c4c67..7151ef2c174ecf380daaeee329e5e918710b75e3 100644 (file)
@@ -1,12 +1,10 @@
 using Content.Shared.Physics;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Shared.Audio;
 
 public abstract class SharedContentAudioSystem : EntitySystem
 {
-    [Dependency] protected readonly SharedAudioSystem Audio = default!;
+    [Dependency] private readonly SharedAudioSystem _audio = default!;
 
     /// <summary>
     /// Standard variation to use for sounds.
@@ -16,6 +14,6 @@ public abstract class SharedContentAudioSystem : EntitySystem
     public override void Initialize()
     {
         base.Initialize();
-        Audio.OcclusionCollisionMask = (int) CollisionGroup.Impassable;
+        _audio.OcclusionCollisionMask = (int) CollisionGroup.Impassable;
     }
 }
index 2d721390e67c0f16d36bba0c3fcdd1aa42bf144b..bfefaf2b92d6f6124f6c4d7ee1b06e48a34cec66 100644 (file)
@@ -1,7 +1,6 @@
 using Content.Shared.Damage;
 using Content.Shared.Damage.Prototypes;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 
 namespace Content.Shared.Blocking;
@@ -52,7 +51,7 @@ public sealed partial class BlockingSystem
 
             if (blocking.IsBlocking)
             {
-                _audio.PlayPvs(blocking.BlockSound, uid);
+                _audio.PlayPvs(blocking.BlockSound, uid, AudioParams.Default.WithVariation(0.2f));
             }
         }
     }
index f869c20679d2efdd37191635c674481a388e3ad1..9a379a29e976787c90e5b08b40b58444644a3bfb 100644 (file)
@@ -57,11 +57,8 @@ public sealed partial class BlockingComponent : Component
     /// <summary>
     /// The sound to be played when you get hit while actively blocking
     /// </summary>
-    [DataField("blockSound")] public SoundSpecifier BlockSound =
-        new SoundPathSpecifier("/Audio/Weapons/block_metal1.ogg")
-        {
-            Params = AudioParams.Default.WithVariation(0.25f)
-        };
+    [DataField("blockSound")]
+    public SoundSpecifier BlockSound = new SoundPathSpecifier("/Audio/Weapons/block_metal1.ogg");
 
     /// <summary>
     /// Fraction of original damage shield will take instead of user
index 90b8a28011c468b2c462bbd01f5b95beebcb7661..6add0661339df0c29e8340a04ea46ea33fe10c47 100644 (file)
@@ -493,10 +493,8 @@ public abstract partial class SharedBuckleSystem
 
         _joints.RefreshRelay(buckleUid);
         Appearance.SetData(strapUid, StrapVisuals.State, strapComp.BuckledEntities.Count != 0);
-
-        // TODO: Buckle listening to moveevents is sussy anyway.
-        if (!TerminatingOrDeleted(strapUid))
-            _audio.PlayPredicted(strapComp.UnbuckleSound, strapUid, userUid);
+        var audioSourceUid = userUid != buckleUid ? userUid : strapUid;
+        _audio.PlayPredicted(strapComp.UnbuckleSound, strapUid, audioSourceUid);
 
         var ev = new BuckleChangeEvent(strapUid, buckleUid, false);
         RaiseLocalEvent(buckleUid, ref ev);
index 8f6833566374dad3a993d9fbf8fc2c63dbfbd0cf..1441745b5dac4dc0711d353d6da6281723cfc148 100644 (file)
@@ -7,8 +7,6 @@ using Content.Shared.Mobs.Systems;
 using Content.Shared.Popups;
 using Content.Shared.Pulling;
 using Content.Shared.Standing;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
 using Robust.Shared.Network;
index 89dfdf15c95ded8fbdddcaa87bfae500414fa545..eb74a4994f5836f6ad69dddff5fa7fa79300ba19 100644 (file)
@@ -69,8 +69,6 @@ namespace Content.Shared.CCVar
         public static readonly CVarDef<float> AmbienceVolume =
             CVarDef.Create("ambience.volume", 0.0f, CVar.ARCHIVE | CVar.CLIENTONLY);
 
-        public const float MasterMultiplier = 2f;
-
         // Midi is on engine so deal
         public const float MidiMultiplier = 3f;
 
index 92af6a4f8a3f8ed09fb0dbeb8c3f18142925802c..f2f03c13349c31ae993a48643c31a3343ff1902d 100644 (file)
@@ -3,7 +3,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Lock;
 using Content.Shared.Verbs;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Timing;
 using Robust.Shared.Utility;
@@ -118,7 +117,7 @@ public abstract class SharedItemCabinetSystem : EntitySystem
             return;
 
         cabinet.Opened = !cabinet.Opened;
-        Dirty(uid, cabinet);
+        Dirty(cabinet);
         _itemSlots.SetLock(uid, cabinet.CabinetSlot, !cabinet.Opened);
 
         if (_timing.IsFirstTimePredicted)
index 4045a270780555f31761dae6b78e2da780859187..7353bd0e9c74c6a6aa36ef9f53dcd4339f349759 100644 (file)
@@ -2,8 +2,6 @@
 using Content.Shared.Buckle.Components;
 using Content.Shared.Movement.Events;
 using Content.Shared.StepTrigger.Systems;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Network;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Timing;
index 1a55408916a165c4ac376fbe2b1cd704f45e7685..ed53b78466eba00cace489e891dbe849d1acd3ac 100644 (file)
@@ -4,8 +4,6 @@ using Content.Shared.Chemistry.Components;
 using Content.Shared.Chemistry.Reagent;
 using Content.Shared.Database;
 using Content.Shared.FixedPoint;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Prototypes;
 
 namespace Content.Shared.Chemistry.Reaction
index b18d54cf788f338f4b6d1a8ed70c5e8c2fd6e96f..6ded524b19d90d84cb7f9238529ff638b0508b8a 100644 (file)
@@ -8,8 +8,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Interaction.Components;
 using Content.Shared.Popups;
 using Content.Shared.Stunnable;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Player;
 using Robust.Shared.Serialization;
index 652834e0f89fde436b53abc970dc9ab6fe999c14..46255e4337664b67247959ba1f7438aaecfe4252 100644 (file)
@@ -18,7 +18,6 @@ using Content.Shared.Physics;
 using Content.Shared.Popups;
 using Content.Shared.Stunnable;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Physics;
 using Robust.Shared.Physics.Collision.Shapes;
 using Robust.Shared.Physics.Components;
index ad27101cc145141d2af8ef3a5c76ccbea86b07ee..9194a8208e315d3dd94527214636905bef3a6616 100644 (file)
@@ -9,8 +9,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Interaction.Events;
 using Content.Shared.Popups;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.GameStates;
 using Robust.Shared.Network;
index 3ad85d9579cc7486bdfd5f18d997933846c14920..4951bb7f1cb410b92aae53dbb7e79b5cfa3eb12e 100644 (file)
@@ -29,8 +29,6 @@ using Content.Shared.Rejuvenate;
 using Content.Shared.Stunnable;
 using Content.Shared.Verbs;
 using Content.Shared.Weapons.Melee.Events;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Network;
 using Robust.Shared.Player;
index 33f1b0375bc7d807e9fdcc5f1d840db0a92e127c..40c4f7eb8f276d0a426329d4b4c009301921c95c 100644 (file)
@@ -16,7 +16,6 @@ using Content.Shared.Throwing;
 using Content.Shared.Weapons.Melee.Events;
 using JetBrains.Annotations;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Network;
 using Robust.Shared.Player;
 using Robust.Shared.Random;
index 3d406843f5feda17903fc3c0f509cd78775b46e3..192fd200789689ac43095e7c2e7fb8a2f96e7c6f 100644 (file)
@@ -4,8 +4,6 @@ using Content.Shared.DoAfter;
 using Content.Shared.Mobs;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Popups;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Serialization;
 
index 7c5ef45275150f3e07c4b5abb96c720a45001a39..a9a52010fd6c9b6792e92dcc45675b0338a2bd23 100644 (file)
@@ -1,8 +1,6 @@
 using Content.Shared.Doors.Components;
 using Content.Shared.Popups;
 using Content.Shared.Prying.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Shared.Doors.Systems;
 
index 85bb399b4805f8872ff7f363f1e6d53279f75d7b..084c3b4ea2cb7009e172aeb7f7e0bcd837fc5522 100644 (file)
@@ -14,8 +14,6 @@ using Robust.Shared.Physics.Components;
 using Robust.Shared.Physics.Events;
 using Robust.Shared.Physics.Systems;
 using Robust.Shared.Timing;
-using Content.Shared.Prying.Components;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Shared.Doors.Systems;
 
index d249bb861b1f49c96d797593b1bb48303e6ca7c7..90c9f0e1e0fddfa06c89412caf979a6b972cf8a2 100644 (file)
@@ -11,7 +11,6 @@ using Content.Shared.Movement.Systems;
 using Content.Shared.Popups;
 using Content.Shared.Strip.Components;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Network;
 using Robust.Shared.Player;
@@ -24,7 +23,6 @@ public abstract partial class InventorySystem
     [Dependency] private readonly SharedPopupSystem _popup = default!;
     [Dependency] private readonly MovementSpeedModifierSystem _movementSpeed = default!;
     [Dependency] private readonly SharedInteractionSystem _interactionSystem = default!;
-    [Dependency] private readonly SharedAudioSystem _audio = default!;
     [Dependency] private readonly SharedContainerSystem _containerSystem = default!;
     [Dependency] private readonly SharedHandsSystem _handsSystem = default!;
     [Dependency] private readonly IGameTiming _gameTiming = default!;
@@ -208,10 +206,10 @@ public abstract partial class InventorySystem
                     filter.RemoveWhereAttachedEntity(entity => entity == actor);
             }
 
-            _audio.PlayPredicted(clothing.EquipSound, target, actor);
+            SoundSystem.Play(clothing.EquipSound.GetSound(), filter, target, clothing.EquipSound.Params.WithVolume(-2f));
         }
 
-        Dirty(target, inventory);
+        inventory.Dirty();
 
         _movementSpeed.RefreshMovementSpeedModifiers(target);
 
@@ -395,11 +393,10 @@ public abstract partial class InventorySystem
                     filter.RemoveWhereAttachedEntity(entity => entity == actor);
             }
 
-            _audio.PlayPredicted(clothing.UnequipSound, target, actor);
+            SoundSystem.Play(clothing.UnequipSound.GetSound(), filter, target, clothing.UnequipSound.Params.WithVolume(-2f));
         }
 
         Dirty(target, inventory);
-
         _movementSpeed.RefreshMovementSpeedModifiers(target);
 
         return true;
index 2fa15800a312ee4a510aed8e8f4f7514bc81d68c..d530b07b18636bb12c8216849a9bbf770aa0ed91 100644 (file)
@@ -3,8 +3,6 @@ using Content.Shared.Clothing.EntitySystems;
 using Content.Shared.Item;
 using Content.Shared.Light.Components;
 using Content.Shared.Toggleable;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.GameStates;
 
 namespace Content.Shared.Light;
index 174818c4e81de808a55727965bf614380b577fd2..31187a96cb9a5e6871de6230b08fe6f10cc4eebd 100644 (file)
@@ -30,19 +30,13 @@ public sealed partial class LockComponent : Component
     /// The sound played when unlocked.
     /// </summary>
     [DataField("unlockingSound"), ViewVariables(VVAccess.ReadWrite)]
-    public SoundSpecifier UnlockSound = new SoundPathSpecifier("/Audio/Machines/door_lock_off.ogg")
-    {
-        Params = AudioParams.Default.WithVolume(-5f),
-    };
+    public SoundSpecifier UnlockSound = new SoundPathSpecifier("/Audio/Machines/door_lock_off.ogg");
 
     /// <summary>
     /// The sound played when locked.
     /// </summary>
     [DataField("lockingSound"), ViewVariables(VVAccess.ReadWrite)]
-    public SoundSpecifier LockSound = new SoundPathSpecifier("/Audio/Machines/door_lock_on.ogg")
-    {
-        Params = AudioParams.Default.WithVolume(-5f)
-    };
+    public SoundSpecifier LockSound = new SoundPathSpecifier("/Audio/Machines/door_lock_on.ogg");
 
     /// <summary>
     /// Whether or not an emag disables it.
index 7babc6a9c0cb590545051c00b3fe73818445edbb..97baa28bf90d7c8c755f8255d60da425fb48c105 100644 (file)
@@ -11,7 +11,6 @@ using Content.Shared.Storage.Components;
 using Content.Shared.Verbs;
 using JetBrains.Annotations;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Utility;
 
 namespace Content.Shared.Lock;
@@ -103,11 +102,11 @@ public sealed class LockSystem : EntitySystem
 
         _sharedPopupSystem.PopupClient(Loc.GetString("lock-comp-do-lock-success",
                 ("entityName", Identity.Name(uid, EntityManager))), uid, user);
-        _audio.PlayPredicted(lockComp.LockSound, uid, user);
+        _audio.PlayPredicted(lockComp.LockSound, uid, user, AudioParams.Default.WithVolume(-5));
 
         lockComp.Locked = true;
         _appearanceSystem.SetData(uid, StorageVisuals.Locked, true);
-        Dirty(uid, lockComp);
+        Dirty(lockComp);
 
         var ev = new LockToggledEvent(true);
         RaiseLocalEvent(uid, ref ev, true);
@@ -131,11 +130,11 @@ public sealed class LockSystem : EntitySystem
                 ("entityName", Identity.Name(uid, EntityManager))), uid, user.Value);
         }
 
-        _audio.PlayPredicted(lockComp.UnlockSound, uid, user);
+        _audio.PlayPredicted(lockComp.UnlockSound, uid, user, AudioParams.Default.WithVolume(-5));
 
         lockComp.Locked = false;
         _appearanceSystem.SetData(uid, StorageVisuals.Locked, false);
-        Dirty(uid, lockComp);
+        Dirty(lockComp);
 
         var ev = new LockToggledEvent(false);
         RaiseLocalEvent(uid, ref ev, true);
@@ -214,7 +213,7 @@ public sealed class LockSystem : EntitySystem
     {
         if (!component.Locked || !component.BreakOnEmag)
             return;
-        _audio.PlayPredicted(component.UnlockSound, uid, null);
+        _audio.PlayPredicted(component.UnlockSound, uid, null, AudioParams.Default.WithVolume(-5));
         _appearanceSystem.SetData(uid, StorageVisuals.Locked, false);
         RemComp<LockComponent>(uid); //Literally destroys the lock as a tell it was emagged
         args.Handled = true;
index eda5cc4058eb2074ac501d17900e72033f5c58b5..761469f99aafb10f85e292a65035d7cd10e4cf5c 100644 (file)
@@ -126,7 +126,7 @@ public sealed partial class MaterialReclaimerComponent : Component
     [DataField]
     public TimeSpan SoundCooldown = TimeSpan.FromSeconds(0.8f);
 
-    public EntityUid? Stream;
+    public IPlayingAudioStream? Stream;
 
     /// <summary>
     /// A counter of how many items have been processed
index 31df11fa8b4e0ecedb23e2b0bf9cb4c4e5ba549c..c3c712b617b31add390a12e66b78503703b3362c 100644 (file)
@@ -8,8 +8,6 @@ using Content.Shared.Emag.Systems;
 using Content.Shared.Examine;
 using Content.Shared.Mobs.Components;
 using Content.Shared.Stacks;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Physics.Events;
 using Robust.Shared.Timing;
@@ -50,7 +48,7 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
 
     private void OnShutdown(EntityUid uid, MaterialReclaimerComponent component, ComponentShutdown args)
     {
-        _audio.Stop(component.Stream);
+        component.Stream?.Stop();
     }
 
     private void OnUnpaused(EntityUid uid, MaterialReclaimerComponent component, ref EntityUnpausedEvent args)
@@ -118,7 +116,8 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
 
         if (Timing.CurTime > component.NextSound)
         {
-            component.Stream = _audio.PlayPredicted(component.Sound, uid, user)?.Entity;
+            component.Stream = _audio.PlayPredicted(component.Sound, uid, user);
+
             component.NextSound = Timing.CurTime + component.SoundCooldown;
         }
 
@@ -168,11 +167,9 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
 
         component.ItemsProcessed++;
         if (component.CutOffSound)
-        {
-            _audio.Stop(component.Stream);
-        }
+            component.Stream?.Stop();
 
-        Dirty(uid, component);
+        Dirty(component);
     }
 
     /// <summary>
@@ -184,7 +181,7 @@ public abstract class SharedMaterialReclaimerSystem : EntitySystem
             return;
         component.Enabled = enabled;
         AmbientSound.SetAmbience(uid, enabled && component.Powered);
-        Dirty(uid, component);
+        Dirty(component);
     }
 
     /// <summary>
index 1440a6ef1f2c3d4c4c5bb193846a1802688139c5..b4254fe0798d2c1b6dc56b1358cc229df790d860 100644 (file)
@@ -4,7 +4,6 @@ using Content.Shared.Mech.Equipment.Systems;
 using Content.Shared.Timing;
 using Robust.Shared.Audio;
 using System.Linq;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Shared.Mech.Equipment.Systems;
 
index 6e8d47fd3e6282f3cf3f61da093b5a2b19bf8b11..af065d0dec80719836982ac63e2cfb646b2bcde8 100644 (file)
@@ -12,7 +12,6 @@ using Content.Shared.Movement.Events;
 using Content.Shared.Pulling.Components;
 using Content.Shared.Tag;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Configuration;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
index f9e5d4a1f63d2691445b05e085701fa29571918d..d376d05724b14f4a35f1314ccf973a8cf0d7ee0c 100644 (file)
@@ -6,7 +6,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Ninja.Components;
 using Content.Shared.Physics;
 using Content.Shared.Popups;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Timing;
 
 namespace Content.Shared.Ninja.Systems;
index 224152a402befd5f9552a117c20479d17edcfda9..473e29cc943df87449cdfc67b20cd922fbbce78a 100644 (file)
@@ -4,7 +4,6 @@ using Content.Shared.Clothing.EntitySystems;
 using Content.Shared.Inventory.Events;
 using Content.Shared.Ninja.Components;
 using Content.Shared.Timing;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Shared.Ninja.Systems;
 
index 3b9eded288deaf79b65b36dbc71d645226be4816..63b4cb13aa634e7ff79cb36a93ce7fd89c35180a 100644 (file)
@@ -4,9 +4,6 @@ using Content.Shared.DoAfter;
 using Content.Shared.Hands.EntitySystems;
 using Content.Shared.Interaction;
 using Content.Shared.Throwing;
-using Content.Shared.Weapons.Ranged.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Network;
 using Robust.Shared.Physics;
index bc37ab035af2c851ededb7e4353e56799ed18681..5fd94c343855c4b77750a39bc7edfcc3ae739985 100644 (file)
@@ -8,8 +8,6 @@ using Content.Shared.Doors.Components;
 using System.Diagnostics.CodeAnalysis;
 using Content.Shared.Interaction;
 using Content.Shared.Popups;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using PryUnpoweredComponent = Content.Shared.Prying.Components.PryUnpoweredComponent;
 
 namespace Content.Shared.Prying.Systems;
index d7126716ed1268f01545d9f92a26ca28ee06e7dc..ccc47a2fdeb8905f66913191b3efec836c0989e0 100644 (file)
@@ -13,7 +13,6 @@ using Content.Shared.RCD.Components;
 using Content.Shared.Tag;
 using Content.Shared.Tiles;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
 using Robust.Shared.Network;
index 71edb70b37c38635317e276cfed147aec3050d8d..585c1a51dcb0f5e4e301467ef69528f6b39ae77c 100644 (file)
@@ -82,7 +82,7 @@ public sealed partial class GeigerComponent : Component
     ///     Current stream of geiger counter audio.
     ///     Played only for current user.
     /// </summary>
-    public EntityUid? Stream;
+    public IPlayingAudioStream? Stream;
 }
 
 [Serializable, NetSerializable]
index 31856eefac77d37d00d832a0c9fa6cbf2d366466..eb97fe41133b5bb3bbd3e2e8c7b348b73efd8652 100644 (file)
@@ -9,8 +9,6 @@ using Content.Shared.Radio.Components;
 using Content.Shared.Tools;
 using Content.Shared.Tools.Components;
 using Content.Shared.Wires;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Network;
 using Robust.Shared.Prototypes;
index 5ae01ebb987ce3bc3862be7d286ec04164e533c2..93293d09be2e37d6efaa4c6ffdb215f37278669e 100644 (file)
@@ -3,8 +3,6 @@ using Content.Shared.DoAfter;
 using Content.Shared.Random;
 using Content.Shared.Random.Helpers;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Network;
 using Robust.Shared.Prototypes;
 using Robust.Shared.Random;
index d678b14b92f8268ae02be5f1eca8724bc4be22fc..cbc54c91e37a7fc431b5060e5668a1aa3ab2f8a3 100644 (file)
@@ -6,8 +6,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Popups;
 using Content.Shared.Stacks;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
 using Robust.Shared.Prototypes;
index a75d6113c95659dc8f7b2cd3ff893e0baca2a95f..47fb9407860dd0b3bc6efff31e255748091f591e 100644 (file)
@@ -33,8 +33,6 @@ public sealed partial class EmaggableMedibotComponent : Component
     /// <summary>
     /// Sound to play when the bot has been emagged
     /// </summary>
-    [DataField("sparkSound")] public SoundSpecifier SparkSound = new SoundCollectionSpecifier("sparks")
-    {
-        Params = AudioParams.Default.WithVolume(8f),
-    };
+    [DataField("sparkSound")]
+    public SoundSpecifier SparkSound = new SoundCollectionSpecifier("sparks");
 }
index 464e95b77fe5128f4531509b841debdc6ac40b1d..fe88cbae5cc29532228c6ccf94f7417ea2ff911a 100644 (file)
@@ -1,6 +1,5 @@
 using Content.Shared.Emag.Systems;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 
 namespace Content.Shared.Silicons.Bots;
 
@@ -23,7 +22,7 @@ public sealed class MedibotSystem : EntitySystem
         if (!TryComp<MedibotComponent>(uid, out var medibot))
             return;
 
-        _audio.PlayPredicted(comp.SparkSound, uid, args.UserUid);
+        _audio.PlayPredicted(comp.SparkSound, uid, args.UserUid, AudioParams.Default.WithVolume(8));
 
         medibot.StandardMed = comp.StandardMed;
         medibot.StandardMedAmount = comp.StandardMedAmount;
index 3bab8d80b0956c47449ea7b8dfea12c5c12242fd..fe5cd0377f4104aee7b41ec878d249f6e8cd2e3e 100644 (file)
@@ -61,7 +61,7 @@ public sealed partial class SingularityComponent : Component
     /// The audio stream that plays the sound specified by <see cref="AmbientSound"/> on loop.
     /// </summary>
     [ViewVariables(VVAccess.ReadWrite)]
-    public EntityUid? AmbientSoundStream = null;
+    public IPlayingAudioStream? AmbientSoundStream = null;
 
     /// <summary>
     ///     The sound that the singularity produces when it forms.
index 60d53eb16f483ccd9857236834beaf04cbe0376f..00f023f9a3a67c9aae80d36fb283201f4828a3ad 100644 (file)
@@ -5,8 +5,6 @@ using Content.Shared.StatusEffect;
 using Content.Shared.StepTrigger.Systems;
 using Content.Shared.Stunnable;
 using JetBrains.Annotations;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Physics.Systems;
index e9ae86ed2af0d50a2e55f2f22e7c7eb615e5c6da..ea42b4bff93f8d7efc235bada70b1945f5741a08 100644 (file)
@@ -7,7 +7,6 @@ using Content.Shared.Sound.Components;
 using Content.Shared.Throwing;
 using JetBrains.Annotations;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Network;
 using Robust.Shared.Physics.Components;
@@ -143,11 +142,8 @@ public abstract class SharedEmitSoundSystem : EntitySystem
         var fraction = MathF.Min(1f, (physics.LinearVelocity.Length() - component.MinimumVelocity) / MaxVolumeVelocity);
         var volume = MinVolume + (MaxVolume - MinVolume) * fraction;
         component.NextSound = _timing.CurTime + EmitSoundOnCollideComponent.CollideCooldown;
-        var sound = component.Sound;
 
-        if (_netMan.IsServer && sound != null)
-        {
-            _audioSystem.PlayPvs(_audioSystem.GetSound(sound), uid, AudioParams.Default.WithVolume(volume));
-        }
+        if (_netMan.IsServer)
+            _audioSystem.PlayPvs(component.Sound, uid, AudioParams.Default.WithVolume(volume));
     }
 }
index 517831b8a1b3a5d425cb597028b321d6218d8d01..bb74a088b3e895d1e240e75611603a27445e950c 100644 (file)
@@ -2,7 +2,6 @@ using Content.Shared.Hands.Components;
 using Content.Shared.Physics;
 using Content.Shared.Rotation;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Physics;
 using Robust.Shared.Physics.Systems;
 
@@ -82,7 +81,7 @@ namespace Content.Shared.Standing
 
             if (playSound)
             {
-                _audio.PlayPredicted(standingState.DownSound, uid, uid);
+                _audio.PlayPredicted(standingState.DownSound, uid, uid, AudioParams.Default.WithVariation(0.25f));
             }
 
             return true;
index 1672e27214b244ef114bd998efefa289cd096aeb..ad86a52665d93d0d5c084ad3fa2237aacfaf67aa 100644 (file)
@@ -5,8 +5,6 @@ using Content.Shared.Interaction;
 using Content.Shared.Placeable;
 using Content.Shared.Storage.Components;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Random;
 using Robust.Shared.Utility;
index 0122e5b53a0a191ee510c934a6965948cc2f5daa..2d85f79e0388d9cc8548ad6356dbbaf2c18bac72 100644 (file)
@@ -15,8 +15,6 @@ using Content.Shared.Storage.Components;
 using Content.Shared.Tools.Systems;
 using Content.Shared.Verbs;
 using Content.Shared.Wall;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.GameStates;
 using Robust.Shared.Map;
index 1c74b0f973026e4f8db46a942aa0b9c0f6069337..5faec99fd5b7a9d339163f88d12456f9bda62afc 100644 (file)
@@ -17,8 +17,6 @@ using Content.Shared.Stacks;
 using Content.Shared.Storage.Components;
 using Content.Shared.Timing;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
 using Robust.Shared.Random;
index c447f8c8bc79e33b4c483d91e1906f098e18f5df..4875f2f68f8d9a04b578437ac1ed529a81513b85 100644 (file)
@@ -18,7 +18,6 @@ using Content.Shared.Standing;
 using Content.Shared.StatusEffect;
 using Content.Shared.Throwing;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.GameStates;
 using Robust.Shared.Player;
 
index 1afaab3539d1264cf38ee7554aad11925805b717..e614a2c040ff01cf4ebfa95b5603bb92b07acc56 100644 (file)
@@ -6,8 +6,6 @@ using Content.Shared.Pulling;
 using Content.Shared.Pulling.Components;
 using Content.Shared.Teleportation.Components;
 using Content.Shared.Verbs;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Network;
 using Robust.Shared.Physics.Dynamics;
index 92208a76d4083763d8d06f8b3f4dc930116ff5cf..6d497c003d7a353571651066bde7efe05aa8b965 100644 (file)
@@ -15,10 +15,7 @@ namespace Content.Shared.Tiles
         [DataField("outputs", customTypeSerializer: typeof(PrototypeIdListSerializer<ContentTileDefinition>))]
         public List<string>? OutputTiles;
 
-        [DataField("placeTileSound")] public SoundSpecifier PlaceTileSound =
-            new SoundPathSpecifier("/Audio/Items/genhit.ogg")
-            {
-                Params = AudioParams.Default.WithVariation(0.125f),
-            };
+        [DataField("placeTileSound")]
+        public SoundSpecifier PlaceTileSound = new SoundPathSpecifier("/Audio/Items/genhit.ogg");
     }
 }
index 21e21fa9e9bc4cd530c39225293be5ca6fb4b591..dcf914ccf86af3e71fed231e2d2da3a4e3fef17e 100644 (file)
@@ -10,7 +10,6 @@ using Content.Shared.Physics;
 using Content.Shared.Popups;
 using Content.Shared.Stacks;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
 using Robust.Shared.Network;
@@ -179,7 +178,7 @@ public sealed class FloorTileSystem : EntitySystem
         var variant = (byte) (_timing.CurTick.Value % ((ContentTileDefinition) _tileDefinitionManager[tileId]).Variants);
         mapGrid.SetTile(location.Offset(new Vector2(offset, offset)), new Tile(tileId, 0, variant));
 
-        _audio.PlayPredicted(placeSound, location, user);
+        _audio.PlayPredicted(placeSound, location, user, AudioHelpers.WithVariation(0.125f, _random));
     }
 
     public bool CanPlaceTile(EntityUid gridUid, MapGridComponent component, [NotNullWhen(false)] out string? reason)
index 91984d29e340f41358bc99b4dc6f937f252cccf4..c1a2bdc2ddae35cac6bcaf90c1a7bd5f2d2f5f2a 100644 (file)
@@ -3,8 +3,6 @@ using Content.Shared.DoAfter;
 using Content.Shared.Interaction;
 using Content.Shared.Maps;
 using Content.Shared.Tools.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Network;
 using Robust.Shared.Prototypes;
@@ -54,7 +52,7 @@ public abstract partial class SharedToolSystem : EntitySystem
         if (tool.UseSound == null)
             return;
 
-        _audioSystem.PlayPredicted(tool.UseSound, uid, user);
+        _audioSystem.PlayPredicted(tool.UseSound, uid, user, tool.UseSound.Params.WithVariation(0.175f).AddVolume(-5f));
     }
 
     /// <summary>
index 1db698359bdcff3eebc301b16d9534a8fc6792e3..51a7471f1e1c7c298550fcf9d56c39750fe995e2 100644 (file)
@@ -43,5 +43,5 @@ public sealed partial class ParacusiaComponent : Component
     [DataField("timeBetweenIncidents", customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite)]
     public TimeSpan NextIncidentTime;
 
-    public EntityUid? Stream;
+    public IPlayingAudioStream? Stream;
 }
index a4a4d89a253f4d07d1562ddc7fe305d509593b91..509581cc32aed1e5cf4199cfb19b9274214662f9 100644 (file)
@@ -45,7 +45,7 @@ public sealed partial class VehicleComponent : Component
     };
 
     [ViewVariables]
-    public EntityUid? HonkPlayingStream;
+    public IPlayingAudioStream? HonkPlayingStream;
 
     /// Use ambient sound component for the idle sound.
 
index 475675f22e3fa4c53acd4447dd4491ca0d0e9182..c211ec57f0232bed5931d7fa0b42454b6bfba8f5 100644 (file)
@@ -12,8 +12,6 @@ using Content.Shared.Movement.Systems;
 using Content.Shared.Popups;
 using Content.Shared.Tag;
 using Content.Shared.Vehicle.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Network;
 using Robust.Shared.Physics.Systems;
@@ -176,7 +174,8 @@ public abstract partial class SharedVehicleSystem : EntitySystem
 
         // TODO: Need audio refactor maybe, just some way to null it when the stream is over.
         // For now better to just not loop to keep the code much cleaner.
-        vehicle.HonkPlayingStream = _audioSystem.PlayPredicted(vehicle.HornSound, uid, uid)?.Entity;
+        vehicle.HonkPlayingStream?.Stop();
+        vehicle.HonkPlayingStream = _audioSystem.PlayPredicted(vehicle.HornSound, uid, uid);
         args.Handled = true;
     }
 
index 50803e8ee267f612c3ae750f350beb5be2ce0168..522138eb8b51b22e0b992e6147558eeea2bd0ff7 100644 (file)
@@ -4,8 +4,6 @@ using System.Linq;
 using Content.Shared.DoAfter;
 using Content.Shared.Interaction;
 using Content.Shared.Popups;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Network;
 
 namespace Content.Shared.VendingMachines;
index 3a6afce363837f5c12529fd4d50f64d4da86f3fd..119b10218d8a75c9b564a082749eb53867bb54ba 100644 (file)
@@ -1,8 +1,6 @@
 using Content.Shared.Damage;
 using Content.Shared.Projectiles;
 using Content.Shared.Weapons.Melee.Events;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Network;
 using Robust.Shared.Physics.Events;
 using Robust.Shared.Timing;
index 5eac283ef19e5a97229b0f2bfa568b326ab9a11b..62af6067d05444c0f5681beaa6bb908e193dc13f 100644 (file)
@@ -20,7 +20,6 @@ using Content.Shared.Weapons.Ranged.Components;
 using Content.Shared.Weapons.Ranged.Events;
 using Content.Shared.Weapons.Ranged.Systems;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Physics;
 using Robust.Shared.Physics.Systems;
index 9ee705061a42465da74f6301fbc21344f9a45508..61c84f7d3d08a1a5d60358e5adbf0a2cb5cabb08 100644 (file)
@@ -52,5 +52,5 @@ public abstract partial class BaseForceGunComponent : Component
         Params = AudioParams.Default.WithLoop(true).WithVolume(-8f),
     };
 
-    public EntityUid? Stream;
+    public IPlayingAudioStream? Stream;
 }
index 3aa82c411ced53ff746bada94f248b57b94eb3a0..7713c98955e7010ef35032159161999ffec38d73 100644 (file)
@@ -9,8 +9,6 @@ using Content.Shared.Projectiles;
 using Content.Shared.Timing;
 using Content.Shared.Weapons.Ranged.Components;
 using Content.Shared.Weapons.Ranged.Systems;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Network;
 using Robust.Shared.Physics;
 using Robust.Shared.Physics.Components;
@@ -63,13 +61,13 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
 
             // At least show the visuals.
             component.Projectile = shotUid.Value;
-            Dirty(uid, component);
+            Dirty(component);
             var visuals = EnsureComp<JointVisualsComponent>(shotUid.Value);
             visuals.Sprite =
                 new SpriteSpecifier.Rsi(new ResPath("Objects/Weapons/Guns/Launchers/grappling_gun.rsi"), "rope");
             visuals.OffsetA = new Vector2(0f, 0.5f);
             visuals.Target = uid;
-            Dirty(shotUid.Value, visuals);
+            Dirty(visuals);
         }
 
         TryComp<AppearanceComponent>(uid, out var appearance);
@@ -135,7 +133,7 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
             }
 
             component.Projectile = null;
-            Dirty(uid, component);
+            Dirty(component);
         }
     }
 
@@ -147,18 +145,19 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
         if (value)
         {
             if (Timing.IsFirstTimePredicted)
-                component.Stream = _audio.PlayPredicted(component.ReelSound, uid, user)?.Entity;
+                component.Stream = _audio.PlayPredicted(component.ReelSound, uid, user);
         }
         else
         {
             if (Timing.IsFirstTimePredicted)
             {
-                component.Stream = _audio.Stop(component.Stream);
+                component.Stream?.Stop();
+                component.Stream = null;
             }
         }
 
         component.Reeling = value;
-        Dirty(uid, component);
+        Dirty(component);
     }
 
     public override void Update(float frameTime)
@@ -174,7 +173,8 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
                 if (Timing.IsFirstTimePredicted)
                 {
                     // Just in case.
-                    grappling.Stream = _audio.Stop(grappling.Stream);
+                    grappling.Stream?.Stop();
+                    grappling.Stream = null;
                 }
 
                 continue;
@@ -200,7 +200,7 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
                 _physics.WakeBody(jointComp.Relay.Value);
             }
 
-            Dirty(uid, jointComp);
+            Dirty(jointComp);
 
             if (distance.MaxLength.Equals(distance.MinLength))
             {
@@ -221,7 +221,7 @@ public abstract class SharedGrapplingGunSystem : EntitySystem
         joint.MinLength = 0.35f;
         // Setting velocity directly for mob movement fucks this so need to make them aware of it.
         // joint.Breakpoint = 4000f;
-        Dirty(uid, jointComp);
+        Dirty(jointComp);
     }
 
     [Serializable, NetSerializable]
index 177cb310d18a5bfd896ac8f68fac9105973b38ac..984ae832fb8029e4a239582422ed46287ce386f2 100644 (file)
@@ -7,8 +7,6 @@ using Content.Shared.Mobs.Systems;
 using Content.Shared.Movement.Events;
 using Content.Shared.Throwing;
 using Content.Shared.Toggleable;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
 using Robust.Shared.Network;
@@ -234,10 +232,10 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
 
         // Sad...
         if (_netManager.IsServer && component.Stream == null)
-            component.Stream = _audio.PlayPredicted(component.Sound, gunUid, null)?.Entity;
+            component.Stream = _audio.PlayPredicted(component.Sound, gunUid, null);
 
-        Dirty(target, tethered);
-        Dirty(gunUid, component);
+        Dirty(tethered);
+        Dirty(component);
     }
 
     protected virtual void StopTether(EntityUid gunUid, BaseForceGunComponent component, bool land = true, bool transfer = false)
@@ -271,7 +269,7 @@ public abstract partial class SharedTetherGunSystem : EntitySystem
 
         if (!transfer)
         {
-            _audio.Stop(component.Stream);
+            component.Stream?.Stop();
             component.Stream = null;
         }
 
index 3ca52b28786c8364570dc49c138fb6c778e81e29..51f3e835b7ba0ac67516cb1b31b20dd7ef5b88d0 100644 (file)
@@ -24,5 +24,5 @@ public sealed partial class GrapplingGunComponent : Component
     [ViewVariables(VVAccess.ReadWrite), DataField("cycleSound"), AutoNetworkedField]
     public SoundSpecifier? CycleSound = new SoundPathSpecifier("/Audio/Weapons/Guns/MagIn/kinetic_reload.ogg");
 
-    public EntityUid? Stream;
+    public IPlayingAudioStream? Stream;
 }
index 536f3da8112e50a822d66b4019a6b4cf7b25b33d..ded4ce34a231ab681bc86d087ae0dedb5dbf93f6 100644 (file)
@@ -1,7 +1,5 @@
 using Content.Shared.Examine;
 using Content.Shared.Weapons.Ranged.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Network;
 using Robust.Shared.Player;
 using Robust.Shared.Timing;
index 06667857b35b52e9756d512e9169dbdf7727208a..6f764bb9f4e49b4ea237ad3efb42cde696e95199 100644 (file)
@@ -20,7 +20,6 @@ using Content.Shared.Weapons.Melee.Events;
 using Content.Shared.Weapons.Ranged.Components;
 using Content.Shared.Weapons.Ranged.Events;
 using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Containers;
 using Robust.Shared.Map;
 using Robust.Shared.Network;
index 4986f9a3414b8fad6e918738290b8758d60fa609..ffa8180e1a728ad0d82e2f6293fe1fe0f6c190d3 100644 (file)
@@ -10,8 +10,6 @@ using Content.Shared.Popups;
 using Content.Shared.Projectiles;
 using Content.Shared.Weapons.Ranged.Components;
 using Content.Shared.Weapons.Ranged.Events;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Network;
 using Robust.Shared.Physics.Components;
 using Robust.Shared.Physics.Systems;
index d34893f8aa4fb894502f3a56c2ebbf1c0ad8f24f..c7040515c8e05dc4f837e742901981f3d6aaeecc 100644 (file)
@@ -1,6 +1,4 @@
 using Content.Shared.Maps;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Map;
 using Robust.Shared.Map.Components;
 using Robust.Shared.Physics.Components;
@@ -17,11 +15,13 @@ public abstract class SharedWeatherSystem : EntitySystem
     [Dependency] protected readonly IPrototypeManager ProtoMan = default!;
     [Dependency] private   readonly ITileDefinitionManager _tileDefManager = default!;
     [Dependency] private   readonly MetaDataSystem _metadata = default!;
-    [Dependency] private readonly SharedAudioSystem _audio = default!;
+
+    protected ISawmill Sawmill = default!;
 
     public override void Initialize()
     {
         base.Initialize();
+        Sawmill = Logger.GetSawmill("weather");
         SubscribeLocalEvent<WeatherComponent, EntityUnpausedEvent>(OnWeatherUnpaused);
     }
 
@@ -123,7 +123,7 @@ public abstract class SharedWeatherSystem : EntitySystem
                 // Admin messed up or the likes.
                 if (!ProtoMan.TryIndex<WeatherPrototype>(proto, out var weatherProto))
                 {
-                    Log.Error($"Unable to find weather prototype for {comp.Weather}, ending!");
+                    Sawmill.Error($"Unable to find weather prototype for {comp.Weather}, ending!");
                     EndWeather(uid, comp, proto);
                     continue;
                 }
@@ -156,8 +156,7 @@ public abstract class SharedWeatherSystem : EntitySystem
     /// </summary>
     public void SetWeather(MapId mapId, WeatherPrototype? proto, TimeSpan? endTime)
     {
-        var mapUid = MapManager.GetMapEntityId(mapId);
-        var weatherComp = EnsureComp<WeatherComponent>(mapUid);
+        var weatherComp = EnsureComp<WeatherComponent>(MapManager.GetMapEntityId(mapId));
 
         foreach (var (eProto, weather) in weatherComp.Weather)
         {
@@ -169,7 +168,7 @@ public abstract class SharedWeatherSystem : EntitySystem
                 if (weather.State == WeatherState.Ending)
                     weather.State = WeatherState.Running;
 
-                Dirty(mapUid, weatherComp);
+                Dirty(weatherComp);
                 continue;
             }
 
@@ -179,7 +178,7 @@ public abstract class SharedWeatherSystem : EntitySystem
             if (weather.EndTime == null || weather.EndTime > end)
             {
                 weather.EndTime = end;
-                Dirty(mapUid, weatherComp);
+                Dirty(weatherComp);
             }
         }
 
@@ -212,10 +211,10 @@ public abstract class SharedWeatherSystem : EntitySystem
         if (!component.Weather.TryGetValue(proto, out var data))
             return;
 
-        _audio.Stop(data.Stream);
+        data.Stream?.Stop();
         data.Stream = null;
         component.Weather.Remove(proto);
-        Dirty(uid, component);
+        Dirty(component);
     }
 
     protected virtual bool SetState(WeatherState state, WeatherComponent component, WeatherData weather, WeatherPrototype weatherProto)
index bdc7bfdbf9128084abe1cb3f91beee2ef1c201c4..6166ea0c64e095d86e75883a38e53156c626a305 100644 (file)
@@ -24,7 +24,7 @@ public sealed partial class WeatherData
 {
     // Client audio stream.
     [NonSerialized]
-    public EntityUid? Stream;
+    public IPlayingAudioStream? Stream;
 
     /// <summary>
     /// When the weather started if relevant.
index 399d9b516807aff2237cfef7f47dcf3ab7e0805c..ba87d54aa2ac97cba7bc2bb0e960c804970e0612 100644 (file)
@@ -12,8 +12,6 @@ using Content.Shared.Weapons.Melee.Components;
 using Content.Shared.Weapons.Ranged.Components;
 using Content.Shared.Weapons.Ranged.Systems;
 using Content.Shared.Wieldable.Components;
-using Robust.Shared.Audio;
-using Robust.Shared.Audio.Systems;
 using Robust.Shared.Player;
 using Content.Shared.Timing;
 
index 7922a27f80811ab72cb11d3ed47b46488c953814..1b601c9f95e76f572b6c657750d85a6ea306f8a7 100644 (file)
       path: /Audio/Machines/Nuke/nuke_alarm.ogg
       params:
         volume: -5
-        maxDistance: 10
+        maxdistance: 10
   - type: EmitSoundOnActivate
     sound:
       path: /Audio/Machines/Nuke/nuke_alarm.ogg
       params:
         volume: -5
-        maxDistance: 10
+        maxdistance: 10
 
 - type: entity
   parent: BasePlushie
index a8c3703d787f8f44813d9ea09f3ac3faaa67c67f..132d6b7aff91be95be4626aa1fb746fa89384229 100644 (file)
       path: /Audio/Items/Stamp/thick_stamp_sub.ogg
       params:
         volume: -2
-        maxDistance: 5
+        maxdistance: 5
   - type: Sprite
     sprite: Objects/Misc/bureaucracy.rsi
     state: stamp-mime
       path: /Audio/Items/Stamp/automatic_stamp.ogg
       params:
         volume: -2
-        maxDistance: 5
+        maxdistance: 5
 
 - type: entity
   name: captain's rubber stamp
index 69a81f9f46acb0f0f65e0771affbab4e678be28b..e78d8dd1504f0deeb71dc5f7f1ef0ddf592195d1 100644 (file)
@@ -50,7 +50,7 @@
     beepSound:
       path: "/Audio/Items/locator_beep.ogg"
       params:
-        maxDistance: 1
+        maxdistance: 1
         volume: -8
 
 - type: entity
   - type: ItemSlots
     slots:
       cell_slot:
-        name: power-cell-slot-component-slot-name-default
+        name: power-cell-slot-component-slot-name-default
\ No newline at end of file
index 33186f0a1dda8038647aac29c0b6f491f801fa3e..d574b286c4582eb7ca0e38df0ac1988774a5dc7a 100644 (file)
@@ -9,7 +9,7 @@
       path: /Audio/Machines/microwave_loop.ogg
       params:
         loop: true
-        maxDistance: 5
+        maxdistance: 5
   - type: Sprite
     sprite: Structures/Machines/fat_sucker.rsi
     snapCardinals: true
index 699c3491f1c6d104e46014d4ea846a02cc849eb1..b7886b7ca59bc44b153d5902582f9e8148d4108e 100644 (file)
@@ -81,7 +81,7 @@
       path: /Audio/Ambience/Objects/crushing.ogg
       params:
         volume: 5
-        maxDistance: 5
+        maxdistance: 5
         loop: true
   - type: MaterialStorage
     insertOnInteract: false
index e37f9c24c941b63a2e2841453a01f0cd078beaa7..3cbb0665b88c7ee9964bcf4cd2ca6faaa136690d 100644 (file)
       collection: Whistles
   params:
     variation: 0.125
-    pitch: 0.75
+    pitchscale: 0.75
 
 - type: emoteSounds
   id: FemaleDwarf
       collection: Whistles
   params:
     variation: 0.125
-    pitch: 0.75
+    pitchscale: 0.75
 
 - type: emoteSounds
   id: UnisexMoth
index 9b04270178714e0ee26481a1a60c5674ea81c2c0..f5874ea402430bb902a5d5d1f47953679d79d781 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 9b04270178714e0ee26481a1a60c5674ea81c2c0
+Subproject commit f5874ea402430bb902a5d5d1f47953679d79d781