Reorders Sound Systems signatures to match Popup Systems. (#8728)

This commit is contained in:
keronshb
2022-06-12 19:45:47 -04:00
committed by GitHub
parent 78fb4b88ed
commit f7b1bda3e5
138 changed files with 257 additions and 272 deletions

View File

@@ -527,7 +527,7 @@ namespace Content.Client.Actions
} }
if (action.Sound != null) if (action.Sound != null)
SoundSystem.Play(Filter.Local(), action.Sound.GetSound(), user, action.AudioParams); SoundSystem.Play(action.Sound.GetSound(), Filter.Local(), user, action.AudioParams);
return performedAction; return performedAction;
} }

View File

@@ -45,7 +45,7 @@ namespace Content.Client.Administration
var localPlayer = _playerManager.LocalPlayer; var localPlayer = _playerManager.LocalPlayer;
if (localPlayer?.UserId != message.TrueSender) if (localPlayer?.UserId != message.TrueSender)
{ {
SoundSystem.Play(Filter.Local(), "/Audio/Effects/adminhelp.ogg"); SoundSystem.Play("/Audio/Effects/adminhelp.ogg", Filter.Local());
_clyde.RequestWindowAttention(); _clyde.RequestWindowAttention();
} }

View File

@@ -259,11 +259,9 @@ namespace Content.Client.Audio
.WithPlayOffset(_random.NextFloat(0.0f, 100.0f)) .WithPlayOffset(_random.NextFloat(0.0f, 100.0f))
.WithMaxDistance(comp.Range); .WithMaxDistance(comp.Range);
var stream = SoundSystem.Play( var stream = SoundSystem.Play(sound,
Filter.Local(), Filter.Local(),
sound, comp.Owner, audioParams);
comp.Owner,
audioParams);
if (stream == null) continue; if (stream == null) continue;

View File

@@ -169,7 +169,7 @@ namespace Content.Client.Audio
EndAmbience(); EndAmbience();
if (!CanPlayCollection(_currentCollection)) return; if (!CanPlayCollection(_currentCollection)) return;
var file = _robustRandom.Pick(_currentCollection.PickFiles).ToString(); var file = _robustRandom.Pick(_currentCollection.PickFiles).ToString();
_ambientStream = SoundSystem.Play(Filter.Local(), file, _ambientParams.WithVolume(_ambientParams.Volume + _configManager.GetCVar(CCVars.AmbienceVolume))); _ambientStream = SoundSystem.Play(file, Filter.Local(), _ambientParams.WithVolume(_ambientParams.Volume + _configManager.GetCVar(CCVars.AmbienceVolume)));
} }
private void EndAmbience() private void EndAmbience()
@@ -255,7 +255,7 @@ namespace Content.Client.Audio
{ {
return; return;
} }
_lobbyStream = SoundSystem.Play(Filter.Local(), file, _lobbyParams); _lobbyStream = SoundSystem.Play(file, Filter.Local(), _lobbyParams);
} }
private void EndLobbyMusic() private void EndLobbyMusic()

View File

@@ -34,7 +34,7 @@ public sealed class ClientAdminSoundSystem : SharedAdminSoundSystem
{ {
if(!_adminAudioEnabled) return; if(!_adminAudioEnabled) return;
var stream = SoundSystem.Play(Filter.Local(), soundEvent.Filename, soundEvent.AudioParams); var stream = SoundSystem.Play(soundEvent.Filename, Filter.Local(), soundEvent.AudioParams);
_adminAudio.Add(stream); _adminAudio.Add(stream);
} }

View File

@@ -30,6 +30,6 @@ public sealed class DoorSystem : SharedDoorSystem
protected override void PlaySound(EntityUid uid, string sound, AudioParams audioParams, EntityUid? predictingPlayer, bool predicted) protected override void PlaySound(EntityUid uid, string sound, AudioParams audioParams, EntityUid? predictingPlayer, bool predicted)
{ {
if (GameTiming.InPrediction && GameTiming.IsFirstTimePredicted) if (GameTiming.InPrediction && GameTiming.IsFirstTimePredicted)
SoundSystem.Play(Filter.Local(), sound, uid, audioParams); SoundSystem.Play(sound, Filter.Local(), uid, audioParams);
} }
} }

View File

@@ -143,7 +143,7 @@ namespace Content.Client.GameTicking.Managers
if (string.IsNullOrEmpty(RestartSound)) if (string.IsNullOrEmpty(RestartSound))
return; return;
SoundSystem.Play(Filter.Empty(), RestartSound); SoundSystem.Play(RestartSound, Filter.Empty());
// Cleanup the sound, we only want it to play when the round restarts after it ends normally. // Cleanup the sound, we only want it to play when the round restarts after it ends normally.
RestartSound = null; RestartSound = null;

View File

@@ -12,8 +12,8 @@ namespace Content.Client.Kitchen.EntitySystems
{ {
StopSoundLoop(microwave); StopSoundLoop(microwave);
microwave.PlayingStream = SoundSystem.Play(Filter.Local(), microwave.LoopingSound.GetSound(), microwave.Owner, microwave.PlayingStream = SoundSystem.Play(microwave.LoopingSound.GetSound(), Filter.Local(),
AudioParams.Default.WithMaxDistance(5).WithLoop(true)); microwave.Owner, AudioParams.Default.WithMaxDistance(5).WithLoop(true));
} }
public void StopSoundLoop(MicrowaveComponent microwave) public void StopSoundLoop(MicrowaveComponent microwave)

View File

@@ -49,9 +49,8 @@ namespace Content.Client.Light.Visualizers
TryStopStream(expendableLight.PlayingStream); TryStopStream(expendableLight.PlayingStream);
if (expendableLight.LoopedSound != null) if (expendableLight.LoopedSound != null)
{ {
expendableLight.PlayingStream = SoundSystem.Play(Filter.Local(), expendableLight.PlayingStream = SoundSystem.Play(expendableLight.LoopedSound, Filter.Local(),
expendableLight.LoopedSound, expendableLight.Owner, expendableLight.Owner, SharedExpendableLightComponent.LoopedSoundParams.WithLoop(true));
SharedExpendableLightComponent.LoopedSoundParams.WithLoop(true));
} }
break; break;
} }

View File

@@ -117,7 +117,7 @@ namespace Content.Client.Voting
} }
@new = true; @new = true;
SoundSystem.Play(Filter.Local(), "/Audio/Effects/voteding.ogg"); SoundSystem.Play("/Audio/Effects/voteding.ogg", Filter.Local());
// New vote from the server. // New vote from the server.
var vote = new ActiveVote(voteId) var vote = new ActiveVote(voteId)

View File

@@ -33,6 +33,6 @@ public sealed class FlyBySoundSystem : SharedFlyBySoundSystem
if (args.OurFixture.ID != FlyByFixture || if (args.OurFixture.ID != FlyByFixture ||
!_random.Prob(component.Prob)) return; !_random.Prob(component.Prob)) return;
SoundSystem.Play(Filter.Local(), component.Sound.GetSound(), uid, component.Sound.Params); SoundSystem.Play(component.Sound.GetSound(), Filter.Local(), uid, component.Sound.Params);
} }
} }

View File

@@ -205,7 +205,7 @@ public sealed partial class GunSystem : SharedGunSystem
protected override void PlaySound(EntityUid gun, string? sound, EntityUid? user = null) protected override void PlaySound(EntityUid gun, string? sound, EntityUid? user = null)
{ {
if (sound == null || user == null || !Timing.IsFirstTimePredicted) return; if (sound == null || user == null || !Timing.IsFirstTimePredicted) return;
SoundSystem.Play(Filter.Local(), sound, gun); SoundSystem.Play(sound, Filter.Local(), gun);
} }
protected override void Popup(string message, EntityUid? uid, EntityUid? user) protected override void Popup(string message, EntityUid? uid, EntityUid? user)

View File

@@ -102,7 +102,7 @@ namespace Content.Server.AME
var ent = EntityManager.SpawnEntity("AMEShielding", mapGrid.GridTileToLocal(snapPos)); var ent = EntityManager.SpawnEntity("AMEShielding", mapGrid.GridTileToLocal(snapPos));
SoundSystem.Play(Filter.Pvs(uid), component.UnwrapSound.GetSound(), uid); SoundSystem.Play(component.UnwrapSound.GetSound(), Filter.Pvs(uid), uid);
EntityManager.QueueDeleteEntity(uid); EntityManager.QueueDeleteEntity(uid);
} }

View File

@@ -262,12 +262,12 @@ namespace Content.Server.AME.Components
private void ClickSound() private void ClickSound()
{ {
SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f));
} }
private void InjectSound(bool overloading) private void InjectSound(bool overloading)
{ {
SoundSystem.Play(Filter.Pvs(Owner), _injectSound.GetSound(), Owner, AudioParams.Default.WithVolume(overloading ? 10f : 0f)); SoundSystem.Play(_injectSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(overloading ? 10f : 0f));
} }
} }

View File

@@ -39,7 +39,7 @@ namespace Content.Server.AirlockPainter
if (TryComp<AppearanceComponent>(ev.Target, out var appearance) && if (TryComp<AppearanceComponent>(ev.Target, out var appearance) &&
TryComp<PaintableAirlockComponent>(ev.Target, out PaintableAirlockComponent? airlock)) TryComp<PaintableAirlockComponent>(ev.Target, out PaintableAirlockComponent? airlock))
{ {
SoundSystem.Play(Filter.Pvs(ev.User, entityManager:EntityManager), ev.Component.SpraySound.GetSound(), ev.User); SoundSystem.Play(ev.Component.SpraySound.GetSound(), Filter.Pvs(ev.User, entityManager:EntityManager), ev.User);
appearance.SetData(DoorVisuals.BaseRSI, ev.Sprite); appearance.SetData(DoorVisuals.BaseRSI, ev.Sprite);
} }
} }

View File

@@ -172,7 +172,7 @@ public sealed class AlertLevelSystem : EntitySystem
{ {
if (detail.Sound != null) if (detail.Sound != null)
{ {
SoundSystem.Play(Filter.Broadcast(), detail.Sound.GetSound()); SoundSystem.Play(detail.Sound.GetSound(), Filter.Broadcast());
} }
else else
{ {

View File

@@ -94,7 +94,7 @@ namespace Content.Server.Arcade.Components
Game?.ExecutePlayerAction(msg.PlayerAction); Game?.ExecutePlayerAction(msg.PlayerAction);
break; break;
case PlayerAction.NewGame: case PlayerAction.NewGame:
SoundSystem.Play(Filter.Pvs(Owner), _newGameSound.GetSound(), Owner, AudioParams.Default.WithVolume(-4f)); SoundSystem.Play(_newGameSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-4f));
Game = new SpaceVillainGame(this); Game = new SpaceVillainGame(this);
UserInterface?.SendMessage(Game.GenerateMetaDataMessage()); UserInterface?.SendMessage(Game.GenerateMetaDataMessage());
@@ -200,7 +200,7 @@ namespace Content.Server.Arcade.Components
_latestPlayerActionMessage = Loc.GetString("space-villain-game-player-attack-message", _latestPlayerActionMessage = Loc.GetString("space-villain-game-player-attack-message",
("enemyName", _enemyName), ("enemyName", _enemyName),
("attackAmount", attackAmount)); ("attackAmount", attackAmount));
SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._playerAttackSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); SoundSystem.Play(_owner._playerAttackSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f));
if (!_owner.EnemyInvincibilityFlag) if (!_owner.EnemyInvincibilityFlag)
_enemyHp -= attackAmount; _enemyHp -= attackAmount;
_turtleTracker -= _turtleTracker > 0 ? 1 : 0; _turtleTracker -= _turtleTracker > 0 ? 1 : 0;
@@ -211,7 +211,7 @@ namespace Content.Server.Arcade.Components
_latestPlayerActionMessage = Loc.GetString("space-villain-game-player-heal-message", _latestPlayerActionMessage = Loc.GetString("space-villain-game-player-heal-message",
("magicPointAmount", pointAmount), ("magicPointAmount", pointAmount),
("healAmount", healAmount)); ("healAmount", healAmount));
SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._playerHealSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); SoundSystem.Play(_owner._playerHealSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f));
if (!_owner.PlayerInvincibilityFlag) if (!_owner.PlayerInvincibilityFlag)
_playerMp -= pointAmount; _playerMp -= pointAmount;
_playerHp += healAmount; _playerHp += healAmount;
@@ -220,7 +220,7 @@ namespace Content.Server.Arcade.Components
case PlayerAction.Recharge: case PlayerAction.Recharge:
var chargeAmount = _random.Next(4, 7); var chargeAmount = _random.Next(4, 7);
_latestPlayerActionMessage = Loc.GetString("space-villain-game-player-recharge-message", ("regainedPoints", chargeAmount)); _latestPlayerActionMessage = Loc.GetString("space-villain-game-player-recharge-message", ("regainedPoints", chargeAmount));
SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._playerChargeSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); SoundSystem.Play(_owner._playerChargeSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f));
_playerMp += chargeAmount; _playerMp += chargeAmount;
_turtleTracker -= _turtleTracker > 0 ? 1 : 0; _turtleTracker -= _turtleTracker > 0 ? 1 : 0;
break; break;
@@ -254,7 +254,7 @@ namespace Content.Server.Arcade.Components
UpdateUi(Loc.GetString("space-villain-game-player-wins-message"), UpdateUi(Loc.GetString("space-villain-game-player-wins-message"),
Loc.GetString("space-villain-game-enemy-dies-message", ("enemyName", _enemyName)), Loc.GetString("space-villain-game-enemy-dies-message", ("enemyName", _enemyName)),
true); true);
SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._winSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); SoundSystem.Play(_owner._winSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f));
_owner.ProcessWin(); _owner.ProcessWin();
return false; return false;
} }
@@ -267,7 +267,7 @@ namespace Content.Server.Arcade.Components
UpdateUi(Loc.GetString("space-villain-game-player-loses-message"), UpdateUi(Loc.GetString("space-villain-game-player-loses-message"),
Loc.GetString("space-villain-game-enemy-cheers-message", ("enemyName", _enemyName)), Loc.GetString("space-villain-game-enemy-cheers-message", ("enemyName", _enemyName)),
true); true);
SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._gameOverSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); SoundSystem.Play(_owner._gameOverSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f));
return false; return false;
} }
if (_enemyHp <= 0 || _enemyMp <= 0) if (_enemyHp <= 0 || _enemyMp <= 0)
@@ -276,7 +276,7 @@ namespace Content.Server.Arcade.Components
UpdateUi(Loc.GetString("space-villain-game-player-loses-message"), UpdateUi(Loc.GetString("space-villain-game-player-loses-message"),
Loc.GetString("space-villain-game-enemy-dies-with-player-message ", ("enemyName", _enemyName)), Loc.GetString("space-villain-game-enemy-dies-with-player-message ", ("enemyName", _enemyName)),
true); true);
SoundSystem.Play(Filter.Pvs(_owner.Owner), _owner._gameOverSound.GetSound(), _owner.Owner, AudioParams.Default.WithVolume(-4f)); SoundSystem.Play(_owner._gameOverSound.GetSound(), Filter.Pvs(_owner.Owner), _owner.Owner, AudioParams.Default.WithVolume(-4f));
return false; return false;
} }

View File

@@ -148,7 +148,7 @@ namespace Content.Server.Atmos.Components
_connectStream?.Stop(); _connectStream?.Stop();
if (_connectSound != null) if (_connectSound != null)
_connectStream = SoundSystem.Play(Filter.Pvs(Owner, entityManager: _entMan), _connectSound.GetSound(), Owner, _connectSound.Params); _connectStream = SoundSystem.Play(_connectSound.GetSound(), Filter.Pvs(Owner, entityManager: _entMan), Owner, _connectSound.Params);
UpdateUserInterface(); UpdateUserInterface();
} }
@@ -162,7 +162,7 @@ namespace Content.Server.Atmos.Components
_disconnectStream?.Stop(); _disconnectStream?.Stop();
if (_disconnectSound != null) if (_disconnectSound != null)
_disconnectStream = SoundSystem.Play(Filter.Pvs(Owner, entityManager: _entMan), _disconnectSound.GetSound(), Owner, _disconnectSound.Params); _disconnectStream = SoundSystem.Play(_disconnectSound.GetSound(), Filter.Pvs(Owner, entityManager: _entMan), Owner, _disconnectSound.Params);
UpdateUserInterface(); UpdateUserInterface();
} }
@@ -260,7 +260,7 @@ namespace Content.Server.Atmos.Components
if(environment != null) if(environment != null)
atmosphereSystem.Merge(environment, Air); atmosphereSystem.Merge(environment, Air);
SoundSystem.Play(Filter.Pvs(Owner), _ruptureSound.GetSound(), _entMan.GetComponent<TransformComponent>(Owner).Coordinates, AudioHelpers.WithVariation(0.125f)); SoundSystem.Play(_ruptureSound.GetSound(), Filter.Pvs(Owner), _entMan.GetComponent<TransformComponent>(Owner).Coordinates, AudioHelpers.WithVariation(0.125f));
_entMan.QueueDeleteEntity(Owner); _entMan.QueueDeleteEntity(Owner);
return; return;

View File

@@ -96,8 +96,8 @@ namespace Content.Server.Atmos.EntitySystems
if(_spaceWindSoundCooldown == 0 && !string.IsNullOrEmpty(SpaceWindSound)) if(_spaceWindSoundCooldown == 0 && !string.IsNullOrEmpty(SpaceWindSound))
{ {
var coordinates = tile.GridIndices.ToEntityCoordinates(tile.GridIndex, _mapManager); var coordinates = tile.GridIndices.ToEntityCoordinates(tile.GridIndex, _mapManager);
SoundSystem.Play(Filter.Pvs(coordinates), SpaceWindSound, coordinates, SoundSystem.Play(SpaceWindSound, Filter.Pvs(coordinates),
AudioHelpers.WithVariation(0.125f).WithVolume(MathHelper.Clamp(tile.PressureDifference / 10, 10, 100))); coordinates, AudioHelpers.WithVariation(0.125f).WithVolume(MathHelper.Clamp(tile.PressureDifference / 10, 10, 100)));
} }
} }

View File

@@ -84,8 +84,8 @@ namespace Content.Server.Atmos.EntitySystems
// A few details on the audio parameters for fire. // 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 lesser the pitch variation.
// The greater the fire state, the greater the volume. // The greater the fire state, the greater the volume.
SoundSystem.Play(Filter.Pvs(coordinates), HotspotSound, coordinates, SoundSystem.Play(HotspotSound, Filter.Pvs(coordinates),
AudioHelpers.WithVariation(0.15f/tile.Hotspot.State).WithVolume(-5f + 5f * tile.Hotspot.State)); coordinates, AudioHelpers.WithVariation(0.15f/tile.Hotspot.State).WithVolume(-5f + 5f * tile.Hotspot.State));
} }
if (_hotspotSoundCooldown > HotspotSoundCooldownCycles) if (_hotspotSoundCooldown > HotspotSoundCooldownCycles)

View File

@@ -352,7 +352,7 @@ namespace Content.Server.Atmos.Monitor.Systems
{ {
if (!Resolve(uid, ref monitor)) return; if (!Resolve(uid, ref monitor)) return;
SoundSystem.Play(Filter.Pvs(uid), monitor.AlarmSound.GetSound(), uid, AudioParams.Default.WithVolume(monitor.AlarmVolume)); SoundSystem.Play(monitor.AlarmSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(monitor.AlarmVolume));
} }
/// <summary> /// <summary>

View File

@@ -46,7 +46,7 @@ namespace Content.Server.Atmos.Piping.Binary.EntitySystems
private void OnActivate(EntityUid uid, GasValveComponent component, ActivateInWorldEvent args) private void OnActivate(EntityUid uid, GasValveComponent component, ActivateInWorldEvent args)
{ {
Toggle(uid, component); Toggle(uid, component);
SoundSystem.Play(Filter.Pvs(component.Owner), component.ValveSound.GetSound(), component.Owner, AudioHelpers.WithVariation(0.25f)); SoundSystem.Play(component.ValveSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioHelpers.WithVariation(0.25f));
} }
public void Set(EntityUid uid, GasValveComponent component, bool value) public void Set(EntityUid uid, GasValveComponent component, bool value)

View File

@@ -74,7 +74,7 @@ namespace Content.Server.Bible
} }
summonableComp.AlreadySummoned = false; summonableComp.AlreadySummoned = false;
_popupSystem.PopupEntity(Loc.GetString("bible-summon-respawn-ready", ("book", summonableComp.Owner)), summonableComp.Owner, Filter.Pvs(summonableComp.Owner)); _popupSystem.PopupEntity(Loc.GetString("bible-summon-respawn-ready", ("book", summonableComp.Owner)), summonableComp.Owner, Filter.Pvs(summonableComp.Owner));
SoundSystem.Play(Filter.Pvs(summonableComp.Owner), "/Audio/Effects/radpulse9.ogg", summonableComp.Owner, AudioParams.Default.WithVolume(-4f)); SoundSystem.Play("/Audio/Effects/radpulse9.ogg", Filter.Pvs(summonableComp.Owner), summonableComp.Owner, AudioParams.Default.WithVolume(-4f));
/// Clean up the accumulator and respawn tracking component /// Clean up the accumulator and respawn tracking component
summonableComp.Accumulator = 0; summonableComp.Accumulator = 0;
RemQueue.Enqueue(respawning.Owner); RemQueue.Enqueue(respawning.Owner);
@@ -105,7 +105,7 @@ namespace Content.Server.Bible
{ {
_popupSystem.PopupEntity(Loc.GetString("bible-sizzle"), args.User, Filter.Entities(args.User)); _popupSystem.PopupEntity(Loc.GetString("bible-sizzle"), args.User, Filter.Entities(args.User));
SoundSystem.Play(Filter.Pvs(args.User), component.SizzleSoundPath.GetSound(), args.User); SoundSystem.Play(component.SizzleSoundPath.GetSound(), Filter.Pvs(args.User), args.User);
_damageableSystem.TryChangeDamage(args.User, component.DamageOnUntrainedUse, true); _damageableSystem.TryChangeDamage(args.User, component.DamageOnUntrainedUse, true);
return; return;
@@ -122,7 +122,7 @@ namespace Content.Server.Bible
var selfFailMessage = Loc.GetString(component.LocPrefix + "-heal-fail-self", ("target", args.Target),("bible", uid)); var selfFailMessage = Loc.GetString(component.LocPrefix + "-heal-fail-self", ("target", args.Target),("bible", uid));
_popupSystem.PopupEntity(selfFailMessage, args.User, Filter.Entities(args.User)); _popupSystem.PopupEntity(selfFailMessage, args.User, Filter.Entities(args.User));
SoundSystem.Play(Filter.Pvs(args.Target.Value), "/Audio/Effects/hit_kick.ogg", args.User); SoundSystem.Play("/Audio/Effects/hit_kick.ogg", Filter.Pvs(args.Target.Value), args.User);
_damageableSystem.TryChangeDamage(args.Target.Value, component.DamageOnFail, true); _damageableSystem.TryChangeDamage(args.Target.Value, component.DamageOnFail, true);
return; return;
} }
@@ -134,7 +134,7 @@ namespace Content.Server.Bible
var selfMessage = Loc.GetString(component.LocPrefix + "-heal-success-self", ("target", args.Target),("bible", uid)); var selfMessage = Loc.GetString(component.LocPrefix + "-heal-success-self", ("target", args.Target),("bible", uid));
_popupSystem.PopupEntity(selfMessage, args.User, Filter.Entities(args.User)); _popupSystem.PopupEntity(selfMessage, args.User, Filter.Entities(args.User));
SoundSystem.Play(Filter.Pvs(args.Target.Value), component.HealSoundPath.GetSound(), args.User); SoundSystem.Play(component.HealSoundPath.GetSound(), Filter.Pvs(args.Target.Value), args.User);
_damageableSystem.TryChangeDamage(args.Target.Value, component.Damage, true); _damageableSystem.TryChangeDamage(args.Target.Value, component.Damage, true);
} }

View File

@@ -92,7 +92,7 @@ namespace Content.Server.Body.Components
_entMan.EventBus.RaiseLocalEvent(part, new PartGibbedEvent(Owner, gibs)); _entMan.EventBus.RaiseLocalEvent(part, new PartGibbedEvent(Owner, gibs));
} }
SoundSystem.Play(Filter.Pvs(Owner, entityManager: _entMan), _gibSound.GetSound(), coordinates, AudioHelpers.WithVariation(0.025f)); SoundSystem.Play(_gibSound.GetSound(), Filter.Pvs(Owner, entityManager: _entMan), coordinates, AudioHelpers.WithVariation(0.025f));
if (_entMan.TryGetComponent(Owner, out ContainerManagerComponent? container)) if (_entMan.TryGetComponent(Owner, out ContainerManagerComponent? container))
{ {

View File

@@ -154,7 +154,7 @@ public sealed class BloodstreamSystem : EntitySystem
if (totalFloat > 0 && _robustRandom.Prob(prob)) if (totalFloat > 0 && _robustRandom.Prob(prob))
{ {
TryModifyBloodLevel(uid, (-total) / 5, component); TryModifyBloodLevel(uid, (-total) / 5, component);
SoundSystem.Play(Filter.Pvs(uid), component.InstantBloodSound.GetSound(), uid, AudioParams.Default); SoundSystem.Play(component.InstantBloodSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default);
} }
else if (totalFloat < 0 && oldBleedAmount > 0 && _robustRandom.Prob(healPopupProb)) else if (totalFloat < 0 && oldBleedAmount > 0 && _robustRandom.Prob(healPopupProb))
{ {
@@ -162,7 +162,7 @@ public sealed class BloodstreamSystem : EntitySystem
// because it's burn damage that cauterized their wounds. // because it's burn damage that cauterized their wounds.
// We'll play a special sound and popup for feedback. // We'll play a special sound and popup for feedback.
SoundSystem.Play(Filter.Pvs(uid), component.BloodHealedSound.GetSound(), uid, AudioParams.Default); SoundSystem.Play(component.BloodHealedSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default);
_popupSystem.PopupEntity(Loc.GetString("bloodstream-component-wounds-cauterized"), uid, _popupSystem.PopupEntity(Loc.GetString("bloodstream-component-wounds-cauterized"), uid,
Filter.Entities(uid)); Filter.Entities(uid));
; } ; }

View File

@@ -170,8 +170,8 @@ namespace Content.Server.Botany.Systems
var solutionEntity = args.Used; var solutionEntity = args.Used;
SoundSystem.Play(Filter.Pvs(args.Used), spray.SpraySound.GetSound(), args.Used, SoundSystem.Play(spray.SpraySound.GetSound(), Filter.Pvs(args.Used),
AudioHelpers.WithVariation(0.125f)); args.Used, AudioHelpers.WithVariation(0.125f));
var split =_solutionSystem.Drain(solutionEntity, solution, amount); var split =_solutionSystem.Drain(solutionEntity, solution, amount);

View File

@@ -211,7 +211,7 @@ namespace Content.Server.Buckle.Components
return false; return false;
} }
SoundSystem.Play(Filter.Pvs(Owner), strap.BuckleSound.GetSound(), Owner); SoundSystem.Play(strap.BuckleSound.GetSound(), Filter.Pvs(Owner), Owner);
if (!strap.TryAdd(this)) if (!strap.TryAdd(this))
{ {
@@ -328,7 +328,7 @@ namespace Content.Server.Buckle.Components
UpdateBuckleStatus(); UpdateBuckleStatus();
oldBuckledTo.Remove(this); oldBuckledTo.Remove(this);
SoundSystem.Play(Filter.Pvs(Owner), oldBuckledTo.UnbuckleSound.GetSound(), Owner); SoundSystem.Play(oldBuckledTo.UnbuckleSound.GetSound(), Filter.Pvs(Owner), Owner);
var ev = new BuckleChangeEvent() { Buckling = false, Strap = oldBuckledTo.Owner, BuckledEntity = Owner }; var ev = new BuckleChangeEvent() { Buckling = false, Strap = oldBuckledTo.Owner, BuckledEntity = Owner };
_entMan.EventBus.RaiseLocalEvent(Owner, ev, false); _entMan.EventBus.RaiseLocalEvent(Owner, ev, false);

View File

@@ -101,7 +101,7 @@ namespace Content.Server.Cabinet
return; return;
cabinet.Opened = !cabinet.Opened; cabinet.Opened = !cabinet.Opened;
SoundSystem.Play(Filter.Pvs(uid), cabinet.DoorSound.GetSound(), uid, AudioHelpers.WithVariation(0.15f)); SoundSystem.Play(cabinet.DoorSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.15f));
_itemSlotsSystem.SetLock(uid, cabinet.CabinetSlot, !cabinet.Opened); _itemSlotsSystem.SetLock(uid, cabinet.CabinetSlot, !cabinet.Opened);
UpdateAppearance(uid, cabinet); UpdateAppearance(uid, cabinet);

View File

@@ -110,7 +110,7 @@ namespace Content.Server.Cargo.Components
if (!_cargoConsoleSystem.AddOrder(orders.Database.Id, msg.Requester, msg.Reason, msg.ProductId, if (!_cargoConsoleSystem.AddOrder(orders.Database.Id, msg.Requester, msg.Reason, msg.ProductId,
msg.Amount, _bankAccount.Id)) msg.Amount, _bankAccount.Id))
{ {
SoundSystem.Play(Filter.Pvs(Owner), _errorSound.GetSound(), Owner, AudioParams.Default); SoundSystem.Play(_errorSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default);
} }
break; break;
} }
@@ -143,7 +143,7 @@ namespace Content.Server.Cargo.Components
|| !_cargoConsoleSystem.ChangeBalance(_bankAccount.Id, (-product.PointCost) * order.Amount)) || !_cargoConsoleSystem.ChangeBalance(_bankAccount.Id, (-product.PointCost) * order.Amount))
) )
{ {
SoundSystem.Play(Filter.Pvs(Owner), _errorSound.GetSound(), Owner, AudioParams.Default); SoundSystem.Play(_errorSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default);
break; break;
} }

View File

@@ -47,7 +47,7 @@ public sealed partial class CargoSystem
var product = comp.TeleportQueue.Pop(); var product = comp.TeleportQueue.Pop();
SoundSystem.Play(Filter.Pvs(comp.Owner), comp.TeleportSound.GetSound(), comp.Owner, AudioParams.Default.WithVolume(-8f)); SoundSystem.Play(comp.TeleportSound.GetSound(), Filter.Pvs(comp.Owner), comp.Owner, AudioParams.Default.WithVolume(-8f));
SpawnProduct(comp, product); SpawnProduct(comp, product);
comp.CurrentState = CargoTelepadState.Teleporting; comp.CurrentState = CargoTelepadState.Teleporting;

View File

@@ -161,7 +161,7 @@ public sealed class ChatSystem : SharedChatSystem
_chatManager.ChatMessageToAll(ChatChannel.Radio, message, messageWrap, colorOverride); _chatManager.ChatMessageToAll(ChatChannel.Radio, message, messageWrap, colorOverride);
if (playDefaultSound) if (playDefaultSound)
{ {
SoundSystem.Play(Filter.Broadcast(), AnnouncementSound, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(AnnouncementSound, Filter.Broadcast(), AudioParams.Default.WithVolume(-2f));
} }
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Global station announcement from {sender}: {message}"); _adminLogger.Add(LogType.Chat, LogImpact.Low, $"Global station announcement from {sender}: {message}");
} }
@@ -197,7 +197,7 @@ public sealed class ChatSystem : SharedChatSystem
if (playDefaultSound) if (playDefaultSound)
{ {
SoundSystem.Play(filter, AnnouncementSound, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(AnnouncementSound, filter, AudioParams.Default.WithVolume(-2f));
} }
_adminLogger.Add(LogType.Chat, LogImpact.Low, $"Station Announcement on {station} from {sender}: {message}"); _adminLogger.Add(LogType.Chat, LogImpact.Low, $"Station Announcement on {station} from {sender}: {message}");

View File

@@ -326,7 +326,7 @@ namespace Content.Server.Chemistry.Components
private void ClickSound() private void ClickSound()
{ {
SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f));
} }
} }
} }

View File

@@ -80,7 +80,7 @@ namespace Content.Server.Chemistry.Components
meleeSys.SendLunge(angle, user); meleeSys.SendLunge(angle, user);
} }
SoundSystem.Play(Filter.Pvs(user), _injectSound.GetSound(), user); SoundSystem.Play(_injectSound.GetSound(), Filter.Pvs(user), user);
// Get transfer amount. May be smaller than _transferAmount if not enough room // Get transfer amount. May be smaller than _transferAmount if not enough room
var realTransferAmount = FixedPoint2.Min(TransferAmount, targetSolution.AvailableVolume); var realTransferAmount = FixedPoint2.Min(TransferAmount, targetSolution.AvailableVolume);

View File

@@ -262,7 +262,7 @@ namespace Content.Server.Chemistry.Components
private void ClickSound() private void ClickSound()
{ {
SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f));
} }
private sealed class ReagentInventoryComparer : Comparer<ReagentDispenserInventoryEntry> private sealed class ReagentInventoryComparer : Comparer<ReagentDispenserInventoryEntry>

View File

@@ -19,7 +19,7 @@ namespace Content.Server.Chemistry.EntitySystems
_adminLogger.Add(LogType.ChemicalReaction, reaction.Impact, _adminLogger.Add(LogType.ChemicalReaction, reaction.Impact,
$"Chemical reaction {reaction.ID:reaction} occurred with strength {unitReactions:strength} on entity {ToPrettyString(owner):metabolizer} at {coordinates}"); $"Chemical reaction {reaction.ID:reaction} occurred with strength {unitReactions:strength} on entity {ToPrettyString(owner):metabolizer} at {coordinates}");
SoundSystem.Play(Filter.Pvs(owner, entityManager:EntityManager), reaction.Sound.GetSound(), owner); SoundSystem.Play(reaction.Sound.GetSound(), Filter.Pvs(owner, entityManager:EntityManager), owner);
} }
} }
} }

View File

@@ -114,7 +114,7 @@ namespace Content.Server.Chemistry.ReactionEffects
areaEffectComponent.TryAddSolution(splitSolution); areaEffectComponent.TryAddSolution(splitSolution);
areaEffectComponent.Start(amount, _duration, _spreadDelay, _removeDelay); areaEffectComponent.Start(amount, _duration, _spreadDelay, _removeDelay);
SoundSystem.Play(Filter.Pvs(args.SolutionEntity), _sound.GetSound(), args.SolutionEntity, AudioHelpers.WithVariation(0.125f)); SoundSystem.Play(_sound.GetSound(), Filter.Pvs(args.SolutionEntity), args.SolutionEntity, AudioHelpers.WithVariation(0.125f));
} }
protected abstract SolutionAreaEffectComponent? GetAreaEffectComponent(EntityUid entity); protected abstract SolutionAreaEffectComponent? GetAreaEffectComponent(EntityUid entity);

View File

@@ -38,7 +38,7 @@ namespace Content.Server.Chemistry.ReactionEffects
areaEffectComponent.TryAddSolution(contents); areaEffectComponent.TryAddSolution(contents);
areaEffectComponent.Start(amount, duration, spreadDelay, removeDelay); areaEffectComponent.Start(amount, duration, spreadDelay, removeDelay);
SoundSystem.Play(Filter.Pvs(ent), sound.GetSound(), ent, AudioHelpers.WithVariation(0.125f)); SoundSystem.Play(sound.GetSound(), Filter.Pvs(ent), ent, AudioHelpers.WithVariation(0.125f));
} }
} }
} }

View File

@@ -150,7 +150,7 @@ namespace Content.Server.Cloning.Components
// TODO: Ideally client knows about this and plays it on its own // TODO: Ideally client knows about this and plays it on its own
// Send them a sound to know it happened // Send them a sound to know it happened
if (CloneStartSound != null) if (CloneStartSound != null)
SoundSystem.Play(Filter.SinglePlayer(client), CloneStartSound.GetSound()); SoundSystem.Play(CloneStartSound.GetSound(), Filter.SinglePlayer(client));
var cloneMindReturn = _entities.AddComponent<BeingClonedComponent>(mob); var cloneMindReturn = _entities.AddComponent<BeingClonedComponent>(mob);
cloneMindReturn.Mind = mind; cloneMindReturn.Mind = mind;

View File

@@ -67,7 +67,7 @@ namespace Content.Server.CombatMode
if (_random.Prob(component.DisarmFailChance)) if (_random.Prob(component.DisarmFailChance))
{ {
SoundSystem.Play(Filter.Pvs(args.Performer), component.DisarmFailSound.GetSound(), args.Performer, AudioHelpers.WithVariation(0.025f)); SoundSystem.Play(component.DisarmFailSound.GetSound(), Filter.Pvs(args.Performer), args.Performer, AudioHelpers.WithVariation(0.025f));
var targetName = Name(args.Target); var targetName = Name(args.Target);
@@ -86,7 +86,7 @@ namespace Content.Server.CombatMode
} }
_meleeWeaponSystem.SendAnimation("disarm", angle, args.Performer, args.Performer, new[] { args.Target }); _meleeWeaponSystem.SendAnimation("disarm", angle, args.Performer, args.Performer, new[] { args.Target });
SoundSystem.Play(filterAll, component.DisarmSuccessSound.GetSound(), args.Performer, AudioHelpers.WithVariation(0.025f)); SoundSystem.Play(component.DisarmSuccessSound.GetSound(), filterAll, args.Performer, AudioHelpers.WithVariation(0.025f));
_adminLogger.Add(LogType.DisarmedAction, $"{ToPrettyString(args.Performer):user} used disarm on {ToPrettyString(args.Target):target}"); _adminLogger.Add(LogType.DisarmedAction, $"{ToPrettyString(args.Performer):user} used disarm on {ToPrettyString(args.Target):target}");
var eventArgs = new DisarmedEvent() { Target = args.Target, Source = args.Performer, PushProbability = component.DisarmPushChance }; var eventArgs = new DisarmedEvent() { Target = args.Target, Source = args.Performer, PushProbability = component.DisarmPushChance };

View File

@@ -23,7 +23,7 @@ namespace Content.Server.Construction.Completions
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager) public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{ {
var scale = (float) IoCManager.Resolve<IRobustRandom>().NextGaussian(1, Variation); var scale = (float) IoCManager.Resolve<IRobustRandom>().NextGaussian(1, Variation);
SoundSystem.Play(Filter.Pvs(uid, entityManager: entityManager), Sound.GetSound(), uid, AudioParams.WithPitchScale(scale)); SoundSystem.Play(Sound.GetSound(), Filter.Pvs(uid, entityManager: entityManager), uid, AudioParams.WithPitchScale(scale));
} }
} }
} }

View File

@@ -68,7 +68,7 @@ public sealed class CrayonSystem : SharedCrayonSystem
return; return;
if (component.UseSound != null) if (component.UseSound != null)
SoundSystem.Play(Filter.Pvs(uid), component.UseSound.GetSound(), uid, AudioHelpers.WithVariation(0.125f)); SoundSystem.Play(component.UseSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f));
// Decrease "Ammo" // Decrease "Ammo"
component.Charges--; component.Charges--;

View File

@@ -216,11 +216,11 @@ namespace Content.Server.Cuffs.Components
if (isOwner) if (isOwner)
{ {
SoundSystem.Play(Filter.Pvs(Owner), cuff.StartBreakoutSound.GetSound(), Owner); SoundSystem.Play(cuff.StartBreakoutSound.GetSound(), Filter.Pvs(Owner), Owner);
} }
else else
{ {
SoundSystem.Play(Filter.Pvs(Owner), cuff.StartUncuffSound.GetSound(), Owner); SoundSystem.Play(cuff.StartUncuffSound.GetSound(), Filter.Pvs(Owner), Owner);
} }
var uncuffTime = isOwner ? cuff.BreakoutTime : cuff.UncuffTime; var uncuffTime = isOwner ? cuff.BreakoutTime : cuff.UncuffTime;
@@ -242,7 +242,7 @@ namespace Content.Server.Cuffs.Components
if (result != DoAfterStatus.Cancelled) if (result != DoAfterStatus.Cancelled)
{ {
SoundSystem.Play(Filter.Pvs(Owner), cuff.EndUncuffSound.GetSound(), Owner); SoundSystem.Play(cuff.EndUncuffSound.GetSound(), Filter.Pvs(Owner), Owner);
Container.ForceRemove(cuffsToRemove.Value); Container.ForceRemove(cuffsToRemove.Value);
var transform = _entMan.GetComponent<TransformComponent>(cuffsToRemove.Value); var transform = _entMan.GetComponent<TransformComponent>(cuffsToRemove.Value);

View File

@@ -178,7 +178,7 @@ namespace Content.Server.Cuffs.Components
eventArgs.User.PopupMessage(Loc.GetString("handcuff-component-start-cuffing-target-message",("targetName", eventArgs.Target))); eventArgs.User.PopupMessage(Loc.GetString("handcuff-component-start-cuffing-target-message",("targetName", eventArgs.Target)));
eventArgs.User.PopupMessage(target, Loc.GetString("handcuff-component-start-cuffing-by-other-message",("otherName", eventArgs.User))); eventArgs.User.PopupMessage(target, Loc.GetString("handcuff-component-start-cuffing-by-other-message",("otherName", eventArgs.User)));
} }
SoundSystem.Play(Filter.Pvs(Owner), StartCuffSound.GetSound(), Owner); SoundSystem.Play(StartCuffSound.GetSound(), Filter.Pvs(Owner), Owner);
TryUpdateCuff(eventArgs.User, target, cuffed); TryUpdateCuff(eventArgs.User, target, cuffed);
return true; return true;
@@ -215,7 +215,7 @@ namespace Content.Server.Cuffs.Components
{ {
if (cuffs.TryAddNewCuffs(user, Owner)) if (cuffs.TryAddNewCuffs(user, Owner))
{ {
SoundSystem.Play(Filter.Pvs(Owner), EndCuffSound.GetSound(), Owner); SoundSystem.Play(EndCuffSound.GetSound(), Filter.Pvs(Owner), Owner);
if (target == user) if (target == user)
{ {
user.PopupMessage(Loc.GetString("handcuff-component-cuff-self-success-message")); user.PopupMessage(Loc.GetString("handcuff-component-cuff-self-success-message"));

View File

@@ -34,7 +34,7 @@ namespace Content.Server.Damage.Systems
if (speed < component.MinimumSpeed) return; if (speed < component.MinimumSpeed) return;
SoundSystem.Play(Filter.Pvs(otherBody), component.SoundHit.GetSound(), otherBody, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f)); SoundSystem.Play(component.SoundHit.GetSound(), Filter.Pvs(otherBody), otherBody, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f));
if ((_gameTiming.CurTime - component.LastHit).TotalSeconds < component.DamageCooldown) if ((_gameTiming.CurTime - component.LastHit).TotalSeconds < component.DamageCooldown)
return; return;

View File

@@ -17,7 +17,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
public void Execute(EntityUid owner, DestructibleSystem system) public void Execute(EntityUid owner, DestructibleSystem system)
{ {
var pos = system.EntityManager.GetComponent<TransformComponent>(owner).Coordinates; var pos = system.EntityManager.GetComponent<TransformComponent>(owner).Coordinates;
SoundSystem.Play(Filter.Pvs(pos), Sound.GetSound(), pos, AudioHelpers.WithVariation(0.125f)); SoundSystem.Play(Sound.GetSound(), Filter.Pvs(pos), pos, AudioHelpers.WithVariation(0.125f));
} }
} }
} }

View File

@@ -104,7 +104,7 @@ public sealed class NetworkConfiguratorSystem : EntitySystem
if (_accessSystem.IsAllowed(user.Value, reader)) if (_accessSystem.IsAllowed(user.Value, reader))
return true; return true;
SoundSystem.Play(Filter.Pvs(user.Value), component.SoundNoAccess.GetSound(), target, AudioParams.Default.WithVolume(-2f).WithPitchScale(1.2f)); SoundSystem.Play(component.SoundNoAccess.GetSound(), Filter.Pvs(user.Value), target, AudioParams.Default.WithVolume(-2f).WithPitchScale(1.2f));
_popupSystem.PopupEntity(Loc.GetString("network-configurator-device-access-denied"), target, Filter.Entities(user.Value)); _popupSystem.PopupEntity(Loc.GetString("network-configurator-device-access-denied"), target, Filter.Entities(user.Value));
return false; return false;

View File

@@ -75,7 +75,7 @@ namespace Content.Server.Dice
SetCurrentSide(uid, roll, die); SetCurrentSide(uid, roll, die);
die.Owner.PopupMessageEveryone(Loc.GetString("dice-component-on-roll-land", ("die", die.Owner), ("currentSide", die.CurrentSide))); die.Owner.PopupMessageEveryone(Loc.GetString("dice-component-on-roll-land", ("die", die.Owner), ("currentSide", die.CurrentSide)));
SoundSystem.Play(Filter.Pvs(die.Owner), die.Sound.GetSound(), die.Owner, AudioHelpers.WithVariation(0.05f)); SoundSystem.Play(die.Sound.GetSound(), Filter.Pvs(die.Owner), die.Owner, AudioHelpers.WithVariation(0.05f));
} }
} }
} }

View File

@@ -159,7 +159,7 @@ namespace Content.Server.Disease
AddQueue.Enqueue(uid); AddQueue.Enqueue(uid);
UpdateAppearance(uid, true, true); UpdateAppearance(uid, true, true);
SoundSystem.Play(Filter.Pvs(uid), "/Audio/Machines/diagnoser_printing.ogg", uid); SoundSystem.Play("/Audio/Machines/diagnoser_printing.ogg", Filter.Pvs(uid), uid);
} }
/// <summary> /// <summary>
@@ -190,7 +190,7 @@ namespace Content.Server.Disease
AddQueue.Enqueue(uid); AddQueue.Enqueue(uid);
UpdateAppearance(uid, true, true); UpdateAppearance(uid, true, true);
SoundSystem.Play(Filter.Pvs(uid), "/Audio/Machines/vaccinator_running.ogg", uid); SoundSystem.Play("/Audio/Machines/vaccinator_running.ogg", Filter.Pvs(uid), uid);
} }
/// <summary> /// <summary>

View File

@@ -34,7 +34,7 @@ namespace Content.Server.Disease
public override void Effect(DiseaseEffectArgs args) public override void Effect(DiseaseEffectArgs args)
{ {
if (SnoughSound != null) if (SnoughSound != null)
SoundSystem.Play(Filter.Pvs(args.DiseasedEntity), SnoughSound.GetSound(), args.DiseasedEntity, AudioHelpers.WithVariation(0.2f)); SoundSystem.Play(SnoughSound.GetSound(), Filter.Pvs(args.DiseasedEntity), args.DiseasedEntity, AudioHelpers.WithVariation(0.2f));
EntitySystem.Get<DiseaseSystem>().SneezeCough(args.DiseasedEntity, args.Disease, SnoughMessage, AirTransmit); EntitySystem.Get<DiseaseSystem>().SneezeCough(args.DiseasedEntity, args.Disease, SnoughMessage, AirTransmit);
} }
} }

View File

@@ -114,7 +114,7 @@ namespace Content.Server.Disposal.Tube.Components
private void ClickSound() private void ClickSound()
{ {
SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f));
} }
protected override void OnRemove() protected override void OnRemove()

View File

@@ -83,7 +83,7 @@ namespace Content.Server.Disposal.Tube.Components
private void ClickSound() private void ClickSound()
{ {
SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f));
} }
protected override void OnRemove() protected override void OnRemove()

View File

@@ -72,7 +72,7 @@ namespace Content.Server.Disposal.Tube
} }
component.LastClang = _gameTiming.CurTime; component.LastClang = _gameTiming.CurTime;
SoundSystem.Play(Filter.Pvs(uid), component.ClangSound.GetSound(), uid); SoundSystem.Play(component.ClangSound.GetSound(), Filter.Pvs(uid), uid);
} }
private void OnBreak(EntityUid uid, DisposalTubeComponent component, BreakageEventArgs args) private void OnBreak(EntityUid uid, DisposalTubeComponent component, BreakageEventArgs args)

View File

@@ -200,7 +200,7 @@ namespace Content.Server.Disposal.Unit.EntitySystems
break; break;
case SharedDisposalUnitComponent.UiButton.Power: case SharedDisposalUnitComponent.UiButton.Power:
TogglePower(component); TogglePower(component);
SoundSystem.Play(Filter.Pvs(component.Owner), "/Audio/Machines/machine_switch.ogg", component.Owner, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play("/Audio/Machines/machine_switch.ogg", Filter.Pvs(component.Owner), component.Owner, AudioParams.Default.WithVolume(-2f));
break; break;
default: default:
throw new ArgumentOutOfRangeException(); throw new ArgumentOutOfRangeException();

View File

@@ -154,7 +154,7 @@ namespace Content.Server.Doors.Components
BoltsDown = newBolts; BoltsDown = newBolts;
SoundSystem.Play(Filter.Broadcast(), newBolts ? BoltDownSound.GetSound() : BoltUpSound.GetSound(), Owner); SoundSystem.Play(newBolts ? BoltDownSound.GetSound() : BoltUpSound.GetSound(), Filter.Broadcast(), Owner);
} }
} }
} }

View File

@@ -109,7 +109,7 @@ public sealed class DoorSystem : SharedDoorSystem
} }
// send the sound to players. // send the sound to players.
SoundSystem.Play(filter, sound, uid, audioParams); SoundSystem.Play(sound, filter, uid, audioParams);
} }
#region DoAfters #region DoAfters

View File

@@ -442,7 +442,7 @@ namespace Content.Server.Electrocution
return; return;
} }
SoundSystem.Play(Filter.Pvs(targetUid), electrified.ShockNoises.GetSound(), targetUid, AudioParams.Default.WithVolume(electrified.ShockVolume)); SoundSystem.Play(electrified.ShockNoises.GetSound(), Filter.Pvs(targetUid), targetUid, AudioParams.Default.WithVolume(electrified.ShockVolume));
} }
} }
} }

View File

@@ -284,7 +284,7 @@ public sealed partial class ExplosionSystem : EntitySystem
// play sound. // play sound.
var audioRange = iterationIntensity.Count * 5; var audioRange = iterationIntensity.Count * 5;
var filter = Filter.Pvs(epicenter).AddInRange(epicenter, audioRange); var filter = Filter.Pvs(epicenter).AddInRange(epicenter, audioRange);
SoundSystem.Play(filter, type.Sound.GetSound(), mapEntityCoords, _audioParams); SoundSystem.Play(type.Sound.GetSound(), filter, mapEntityCoords, _audioParams);
return new Explosion(this, return new Explosion(this,
type, type,

View File

@@ -162,7 +162,7 @@ namespace Content.Server.Explosion.EntitySystems
timer.TimeUntilBeep += timer.BeepInterval; timer.TimeUntilBeep += timer.BeepInterval;
var filter = Filter.Pvs(timer.Owner, entityManager: EntityManager); var filter = Filter.Pvs(timer.Owner, entityManager: EntityManager);
SoundSystem.Play(filter, timer.BeepSound.GetSound(), timer.Owner, timer.BeepParams); SoundSystem.Play(timer.BeepSound.GetSound(), filter, timer.Owner, timer.BeepParams);
} }
foreach (var uid in toRemove) foreach (var uid in toRemove)

View File

@@ -85,7 +85,7 @@ public sealed class FireExtinguisherSystem : EntitySystem
var drained = _solutionContainerSystem.Drain(target, targetSolution, transfer); var drained = _solutionContainerSystem.Drain(target, targetSolution, transfer);
_solutionContainerSystem.TryAddSolution(uid, container, drained); _solutionContainerSystem.TryAddSolution(uid, container, drained);
SoundSystem.Play(Filter.Pvs(uid), component.RefillSound.GetSound(), uid); SoundSystem.Play(component.RefillSound.GetSound(), Filter.Pvs(uid), uid);
_popupSystem.PopupEntity(Loc.GetString("fire-extinguisher-component-after-interact-refilled-message", ("owner", uid)), _popupSystem.PopupEntity(Loc.GetString("fire-extinguisher-component-after-interact-refilled-message", ("owner", uid)),
uid, Filter.Entities(args.Target.Value)); uid, Filter.Entities(args.Target.Value));
} }
@@ -134,8 +134,8 @@ public sealed class FireExtinguisherSystem : EntitySystem
return; return;
extinguisher.Safety = !extinguisher.Safety; extinguisher.Safety = !extinguisher.Safety;
SoundSystem.Play(Filter.Pvs(uid), extinguisher.SafetySound.GetSound(), uid, SoundSystem.Play(extinguisher.SafetySound.GetSound(), Filter.Pvs(uid),
AudioHelpers.WithVariation(0.125f).WithVolume(-4f)); uid, AudioHelpers.WithVariation(0.125f).WithVolume(-4f));
UpdateAppearance(uid, extinguisher); UpdateAppearance(uid, extinguisher);
} }
} }

View File

@@ -113,7 +113,7 @@ namespace Content.Server.Flash
}); });
} }
SoundSystem.Play(Filter.Pvs(comp.Owner), comp.Sound.GetSound(), comp.Owner, AudioParams.Default); SoundSystem.Play(comp.Sound.GetSound(), Filter.Pvs(comp.Owner), comp.Owner, AudioParams.Default);
return true; return true;
} }
@@ -169,7 +169,7 @@ namespace Content.Server.Flash
} }
if (sound != null) if (sound != null)
{ {
SoundSystem.Play(Filter.Pvs(transform), sound.GetSound(), transform.Coordinates); SoundSystem.Play(sound.GetSound(), Filter.Pvs(transform), transform.Coordinates);
} }
} }

View File

@@ -130,7 +130,7 @@ public sealed class MoppingSystem : EntitySystem
TryTransfer(used, target, "absorbed", puddle.SolutionName, transferAmount); // Complete the transfer right away, with no doAfter. TryTransfer(used, target, "absorbed", puddle.SolutionName, transferAmount); // Complete the transfer right away, with no doAfter.
sfx = component.TransferSound; sfx = component.TransferSound;
SoundSystem.Play(Filter.Pvs(user), sfx.GetSound(), used); // Give instant feedback for diluting puddle, so that it's clear that the player is adding to the puddle (as opposed to other behaviours, which have a doAfter). SoundSystem.Play(sfx.GetSound(), Filter.Pvs(user), used); // Give instant feedback for diluting puddle, so that it's clear that the player is adding to the puddle (as opposed to other behaviours, which have a doAfter).
msg = "mopping-system-puddle-diluted"; msg = "mopping-system-puddle-diluted";
user.PopupMessage(user, Loc.GetString(msg)); // play message now because we are aborting. user.PopupMessage(user, Loc.GetString(msg)); // play message now because we are aborting.
@@ -307,7 +307,7 @@ public sealed class MoppingSystem : EntitySystem
private void OnTransferComplete(TransferCompleteEvent ev) private void OnTransferComplete(TransferCompleteEvent ev)
{ {
SoundSystem.Play(Filter.Pvs(ev.User), ev.Sound.GetSound(), ev.Tool); // Play the After SFX SoundSystem.Play(ev.Sound.GetSound(), Filter.Pvs(ev.User), ev.Tool); // Play the After SFX
ev.User.PopupMessage(ev.User, Loc.GetString(ev.Message, ("target", ev.Target), ("used", ev.Tool))); // Play the After popup message ev.User.PopupMessage(ev.User, Loc.GetString(ev.Message, ("target", ev.Target), ("used", ev.Tool))); // Play the After popup message

View File

@@ -164,8 +164,8 @@ namespace Content.Server.Fluids.EntitySystems
return true; return true;
} }
SoundSystem.Play(Filter.Pvs(puddleComponent.Owner), puddleComponent.SpillSound.GetSound(), SoundSystem.Play(puddleComponent.SpillSound.GetSound(),
puddleComponent.Owner); Filter.Pvs(puddleComponent.Owner), puddleComponent.Owner);
return true; return true;
} }

View File

@@ -113,7 +113,7 @@ public sealed class SpraySystem : EntitySystem
body.ApplyLinearImpulse(-impulseDirection * component.Impulse); body.ApplyLinearImpulse(-impulseDirection * component.Impulse);
} }
SoundSystem.Play(Filter.Pvs(uid), component.SpraySound.GetSound(), uid, AudioHelpers.WithVariation(0.125f)); SoundSystem.Play(component.SpraySound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f));
RaiseLocalEvent(uid, RaiseLocalEvent(uid,
new RefreshItemCooldownEvent(curTime, curTime + TimeSpan.FromSeconds(component.CooldownTime))); new RefreshItemCooldownEvent(curTime, curTime + TimeSpan.FromSeconds(component.CooldownTime)));

View File

@@ -480,7 +480,7 @@ namespace Content.Server.GameTicking
_chatSystem.DispatchGlobalStationAnnouncement(Loc.GetString(proto.Message), playDefaultSound: true); _chatSystem.DispatchGlobalStationAnnouncement(Loc.GetString(proto.Message), playDefaultSound: true);
if (proto.Sound != null) if (proto.Sound != null)
SoundSystem.Play(Filter.Broadcast(), proto.Sound.GetSound()); SoundSystem.Play(proto.Sound.GetSound(), Filter.Broadcast());
// Only play one because A // Only play one because A
break; break;

View File

@@ -216,7 +216,7 @@ public sealed class SuspicionRuleSystem : GameRuleSystem
var filter = Filter.Empty() var filter = Filter.Empty()
.AddWhere(session => ((IPlayerSession) session).ContentData()?.Mind?.HasRole<SuspicionTraitorRole>() ?? false); .AddWhere(session => ((IPlayerSession) session).ContentData()?.Mind?.HasRole<SuspicionTraitorRole>() ?? false);
SoundSystem.Play(filter, _addedSound.GetSound(), AudioParams.Default); SoundSystem.Play(_addedSound.GetSound(), filter, AudioParams.Default);
_doorSystem.AccessType = SharedDoorSystem.AccessTypes.AllowAllNoExternal; _doorSystem.AccessType = SharedDoorSystem.AccessTypes.AllowAllNoExternal;

View File

@@ -192,7 +192,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem
traitor.Mind.Briefing = Loc.GetString("traitor-role-codewords", ("codewords", string.Join(", ",codewords))); traitor.Mind.Briefing = Loc.GetString("traitor-role-codewords", ("codewords", string.Join(", ",codewords)));
} }
SoundSystem.Play(Filter.Empty().AddWhere(s => ((IPlayerSession)s).Data.ContentData()?.Mind?.HasRole<TraitorRole>() ?? false), _addedSound.GetSound(), AudioParams.Default); SoundSystem.Play(_addedSound.GetSound(), Filter.Empty().AddWhere(s => ((IPlayerSession)s).Data.ContentData()?.Mind?.HasRole<TraitorRole>() ?? false), AudioParams.Default);
} }
private void OnRoundEndText(RoundEndTextAppendEvent ev) private void OnRoundEndText(RoundEndTextAppendEvent ev)

View File

@@ -64,7 +64,7 @@ public sealed class GatherableSystem : EntitySystem
// Complete the gathering process // Complete the gathering process
_damageableSystem.TryChangeDamage(ev.Resource, tool.Damage); _damageableSystem.TryChangeDamage(ev.Resource, tool.Damage);
SoundSystem.Play(Filter.Pvs(ev.Resource, entityManager: EntityManager), tool.GatheringSound.GetSound(), ev.Resource); SoundSystem.Play(tool.GatheringSound.GetSound(), Filter.Pvs(ev.Resource, entityManager: EntityManager), ev.Resource);
tool.GatheringEntities.Remove(ev.Resource); tool.GatheringEntities.Remove(ev.Resource);
// Spawn the loot! // Spawn the loot!

View File

@@ -48,10 +48,8 @@ namespace Content.Server.Gravity.EntitySystems
{ {
_gridsToShake[gridId] = ShakeTimes; _gridsToShake[gridId] = ShakeTimes;
SoundSystem.Play( SoundSystem.Play(comp.GravityShakeSound.GetSound(),
Filter.BroadcastGrid(gridId), Filter.BroadcastGrid(gridId), AudioParams.Default.WithVolume(-2f));
comp.GravityShakeSound.GetSound(),
AudioParams.Default.WithVolume(-2f));
} }
private void ShakeGrids() private void ShakeGrids()

View File

@@ -200,7 +200,7 @@ namespace Content.Server.Guardian
{ {
guardianComponent.Host = ev.Target; guardianComponent.Host = ev.Target;
SoundSystem.Play(Filter.Entities(ev.Target), "/Audio/Effects/guardian_inject.ogg", ev.Target); SoundSystem.Play("/Audio/Effects/guardian_inject.ogg", Filter.Entities(ev.Target), ev.Target);
_popupSystem.PopupEntity(Loc.GetString("guardian-created"), ev.Target, Filter.Entities(ev.Target)); _popupSystem.PopupEntity(Loc.GetString("guardian-created"), ev.Target, Filter.Entities(ev.Target));
// Exhaust the activator // Exhaust the activator
@@ -223,11 +223,11 @@ namespace Content.Server.Guardian
if (args.CurrentMobState.IsCritical()) if (args.CurrentMobState.IsCritical())
{ {
_popupSystem.PopupEntity(Loc.GetString("guardian-critical-warn"), component.HostedGuardian.Value, Filter.Entities(component.HostedGuardian.Value)); _popupSystem.PopupEntity(Loc.GetString("guardian-critical-warn"), component.HostedGuardian.Value, Filter.Entities(component.HostedGuardian.Value));
SoundSystem.Play(Filter.Entities(component.HostedGuardian.Value), "/Audio/Effects/guardian_warn.ogg", component.HostedGuardian.Value); SoundSystem.Play("/Audio/Effects/guardian_warn.ogg", Filter.Entities(component.HostedGuardian.Value), component.HostedGuardian.Value);
} }
else if (args.CurrentMobState.IsDead()) else if (args.CurrentMobState.IsDead())
{ {
SoundSystem.Play(Filter.Pvs(uid), "/Audio/Voice/Human/malescream_guardian.ogg", uid, AudioHelpers.WithVariation(0.20f)); SoundSystem.Play("/Audio/Voice/Human/malescream_guardian.ogg", Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.20f));
EntityManager.RemoveComponent<GuardianHostComponent>(uid); EntityManager.RemoveComponent<GuardianHostComponent>(uid);
} }
} }

View File

@@ -77,7 +77,7 @@ public sealed class ImmovableRodSystem : EntitySystem
if (_random.Prob(component.HitSoundProbability)) if (_random.Prob(component.HitSoundProbability))
{ {
SoundSystem.Play(Filter.Pvs(uid), component.Sound.GetSound(), uid, component.Sound.Params); SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(uid), uid, component.Sound.Params);
} }
if (HasComp<ImmovableRodComponent>(ent)) if (HasComp<ImmovableRodComponent>(ent))

View File

@@ -68,9 +68,9 @@ public sealed class InteractionPopupSystem : EntitySystem
if (sfx is not null) //not all cases will have sound. if (sfx is not null) //not all cases will have sound.
{ {
if (component.SoundPerceivedByOthers) if (component.SoundPerceivedByOthers)
SoundSystem.Play(Filter.Pvs(args.Target), sfx, args.Target); //play for everyone in range SoundSystem.Play(sfx, Filter.Pvs(args.Target), args.Target); //play for everyone in range
else else
SoundSystem.Play(Filter.Entities(args.User, args.Target), sfx, args.Target); //play only for the initiating entity and its target. SoundSystem.Play(sfx, Filter.Entities(args.User, args.Target), args.Target); //play only for the initiating entity and its target.
} }
component.LastInteractTime = curTime; component.LastInteractTime = curTime;

View File

@@ -225,7 +225,7 @@ namespace Content.Server.Kitchen.Components
// destroy microwave // destroy microwave
Broken = true; Broken = true;
SetAppearance(MicrowaveVisualState.Broken); SetAppearance(MicrowaveVisualState.Broken);
SoundSystem.Play(Filter.Pvs(Owner), ItemBreakSound.GetSound(), Owner); SoundSystem.Play(ItemBreakSound.GetSound(), Filter.Pvs(Owner), Owner);
return; return;
} }
@@ -277,7 +277,7 @@ namespace Content.Server.Kitchen.Components
SetAppearance(MicrowaveVisualState.Cooking); SetAppearance(MicrowaveVisualState.Cooking);
var time = _currentCookTimerTime * _cookTimeMultiplier; var time = _currentCookTimerTime * _cookTimeMultiplier;
SoundSystem.Play(Filter.Pvs(Owner), _startCookingSound.GetSound(), Owner, AudioParams.Default); SoundSystem.Play(_startCookingSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default);
Owner.SpawnTimer((int) (_currentCookTimerTime * _cookTimeMultiplier), () => Owner.SpawnTimer((int) (_currentCookTimerTime * _cookTimeMultiplier), () =>
{ {
if (_lostPower) if (_lostPower)
@@ -296,8 +296,8 @@ namespace Content.Server.Kitchen.Components
EjectSolids(); EjectSolids();
SoundSystem.Play(Filter.Pvs(Owner), _cookingCompleteSound.GetSound(), Owner, SoundSystem.Play(_cookingCompleteSound.GetSound(), Filter.Pvs(Owner),
AudioParams.Default.WithVolume(-1f)); Owner, AudioParams.Default.WithVolume(-1f));
SetAppearance(MicrowaveVisualState.Idle); SetAppearance(MicrowaveVisualState.Idle);
_busy = false; _busy = false;
@@ -445,7 +445,7 @@ namespace Content.Server.Kitchen.Components
public void ClickSound() public void ClickSound()
{ {
SoundSystem.Play(Filter.Pvs(Owner), _clickSound.GetSound(), Owner, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(_clickSound.GetSound(), Filter.Pvs(Owner), Owner, AudioParams.Default.WithVolume(-2f));
} }
} }

View File

@@ -123,7 +123,7 @@ namespace Content.Server.Kitchen.EntitySystems
// TODO: Need to be able to leave them on the spike to do DoT, see ss13. // TODO: Need to be able to leave them on the spike to do DoT, see ss13.
EntityManager.QueueDeleteEntity(victimUid); EntityManager.QueueDeleteEntity(victimUid);
SoundSystem.Play(Filter.Pvs(uid), component.SpikeSound.GetSound(), uid); SoundSystem.Play(component.SpikeSound.GetSound(), Filter.Pvs(uid), uid);
} }
private bool TryGetPiece(EntityUid uid, EntityUid user, EntityUid used, private bool TryGetPiece(EntityUid uid, EntityUid user, EntityUid used,

View File

@@ -238,7 +238,7 @@ namespace Content.Server.Kitchen.EntitySystems
switch (program) switch (program)
{ {
case SharedReagentGrinderComponent.GrinderProgram.Grind: case SharedReagentGrinderComponent.GrinderProgram.Grind:
SoundSystem.Play(Filter.Pvs(component.Owner), component.GrindSound.GetSound(), component.Owner, AudioParams.Default); SoundSystem.Play(component.GrindSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioParams.Default);
// Get each item inside the chamber and get the reagents it contains. // Get each item inside the chamber and get the reagents it contains.
// Transfer those reagents to the beaker, given we have one in. // Transfer those reagents to the beaker, given we have one in.
component.Owner.SpawnTimer(component.WorkTime, () => component.Owner.SpawnTimer(component.WorkTime, () =>
@@ -265,7 +265,7 @@ namespace Content.Server.Kitchen.EntitySystems
break; break;
case SharedReagentGrinderComponent.GrinderProgram.Juice: case SharedReagentGrinderComponent.GrinderProgram.Juice:
SoundSystem.Play(Filter.Pvs(component.Owner), component.JuiceSound.GetSound(), component.Owner, AudioParams.Default); SoundSystem.Play(component.JuiceSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioParams.Default);
component.Owner.SpawnTimer(component.WorkTime, () => component.Owner.SpawnTimer(component.WorkTime, () =>
{ {
foreach (var item in component.Chamber.ContainedEntities.ToList()) foreach (var item in component.Chamber.ContainedEntities.ToList())
@@ -299,7 +299,7 @@ namespace Content.Server.Kitchen.EntitySystems
private void ClickSound(ReagentGrinderComponent component) private void ClickSound(ReagentGrinderComponent component)
{ {
SoundSystem.Play(Filter.Pvs(component.Owner), component.ClickSound.GetSound(), component.Owner, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(component.ClickSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioParams.Default.WithVolume(-2f));
} }
} }
} }

View File

@@ -136,7 +136,7 @@ namespace Content.Server.Lathe
// Play a sound when inserting, if any // Play a sound when inserting, if any
if (component.InsertingSound != null) if (component.InsertingSound != null)
{ {
SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.InsertingSound.GetSound(), component.Owner); SoundSystem.Play(component.InsertingSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner);
} }
// We need the prototype to get the color // We need the prototype to get the color
@@ -191,7 +191,7 @@ namespace Content.Server.Lathe
component.UserInterface?.SendMessage(new LatheProducingRecipeMessage(recipe.ID)); component.UserInterface?.SendMessage(new LatheProducingRecipeMessage(recipe.ID));
if (component.ProducingSound != null) if (component.ProducingSound != null)
{ {
SoundSystem.Play(Filter.Pvs(component.Owner), component.ProducingSound.GetSound(), component.Owner); SoundSystem.Play(component.ProducingSound.GetSound(), Filter.Pvs(component.Owner), component.Owner);
} }
UpdateRunningAppearance(component.Owner, true); UpdateRunningAppearance(component.Owner, true);
ProducingAddQueue.Enqueue(component.Owner); ProducingAddQueue.Enqueue(component.Owner);

View File

@@ -123,7 +123,7 @@ namespace Content.Server.Light.EntitySystems
{ {
case ExpendableLightState.Lit: case ExpendableLightState.Lit:
{ {
SoundSystem.Play(Filter.Pvs(component.Owner), component.LitSound.GetSound(), component.Owner); SoundSystem.Play(component.LitSound.GetSound(), Filter.Pvs(component.Owner), component.Owner);
if (component.IconStateLit != string.Empty) if (component.IconStateLit != string.Empty)
{ {
@@ -142,7 +142,7 @@ namespace Content.Server.Light.EntitySystems
case ExpendableLightState.Dead: case ExpendableLightState.Dead:
{ {
if (component.DieSound != null) if (component.DieSound != null)
SoundSystem.Play(Filter.Pvs(component.Owner), component.DieSound.GetSound(), component.Owner); SoundSystem.Play(component.DieSound.GetSound(), Filter.Pvs(component.Owner), component.Owner);
sprite.LayerSetState(0, component.IconStateSpent); sprite.LayerSetState(0, component.IconStateSpent);
sprite.LayerSetShader(0, "shaded"); sprite.LayerSetShader(0, "shaded");

View File

@@ -211,7 +211,7 @@ namespace Content.Server.Light.EntitySystems
appearance.SetData(ToggleableLightVisuals.Enabled, false); appearance.SetData(ToggleableLightVisuals.Enabled, false);
if (makeNoise) if (makeNoise)
SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.TurnOffSound.GetSound(), component.Owner); SoundSystem.Play(component.TurnOffSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner);
return true; return true;
} }
@@ -222,7 +222,7 @@ namespace Content.Server.Light.EntitySystems
if (!_powerCell.TryGetBatteryFromSlot(component.Owner, out var battery)) if (!_powerCell.TryGetBatteryFromSlot(component.Owner, out var battery))
{ {
SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.TurnOnFailSound.GetSound(), component.Owner); SoundSystem.Play(component.TurnOnFailSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner);
_popup.PopupEntity(Loc.GetString("handheld-light-component-cell-missing-message"), component.Owner, Filter.Entities(user)); _popup.PopupEntity(Loc.GetString("handheld-light-component-cell-missing-message"), component.Owner, Filter.Entities(user));
return false; return false;
} }
@@ -232,7 +232,7 @@ namespace Content.Server.Light.EntitySystems
// Simple enough. // Simple enough.
if (component.Wattage > battery.CurrentCharge) if (component.Wattage > battery.CurrentCharge)
{ {
SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.TurnOnFailSound.GetSound(), component.Owner); SoundSystem.Play(component.TurnOnFailSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner);
_popup.PopupEntity(Loc.GetString("handheld-light-component-cell-dead-message"), component.Owner, Filter.Entities(user)); _popup.PopupEntity(Loc.GetString("handheld-light-component-cell-dead-message"), component.Owner, Filter.Entities(user));
return false; return false;
} }
@@ -247,7 +247,7 @@ namespace Content.Server.Light.EntitySystems
if (TryComp(component.Owner, out AppearanceComponent? appearance)) if (TryComp(component.Owner, out AppearanceComponent? appearance))
appearance.SetData(ToggleableLightVisuals.Enabled, true); appearance.SetData(ToggleableLightVisuals.Enabled, true);
SoundSystem.Play(Filter.Pvs(component.Owner, entityManager: EntityManager), component.TurnOnSound.GetSound(), component.Owner); SoundSystem.Play(component.TurnOnSound.GetSound(), Filter.Pvs(component.Owner, entityManager: EntityManager), component.Owner);
return true; return true;
} }

View File

@@ -65,7 +65,7 @@ namespace Content.Server.Light.EntitySystems
if (!Resolve(uid, ref bulb)) if (!Resolve(uid, ref bulb))
return; return;
SoundSystem.Play(Filter.Pvs(uid), bulb.BreakSound.GetSound(), uid); SoundSystem.Play(bulb.BreakSound.GetSound(), Filter.Pvs(uid), uid);
} }
private void UpdateAppearance(EntityUid uid, LightBulbComponent? bulb = null, private void UpdateAppearance(EntityUid uid, LightBulbComponent? bulb = null,

View File

@@ -131,8 +131,8 @@ namespace Content.Server.Light.EntitySystems
var wasReplaced = _poweredLight.ReplaceBulb(fixtureUid, bulb, fixture); var wasReplaced = _poweredLight.ReplaceBulb(fixtureUid, bulb, fixture);
if (wasReplaced) if (wasReplaced)
{ {
SoundSystem.Play(Filter.Pvs(replacerUid), replacer.Sound.GetSound(), SoundSystem.Play(replacer.Sound.GetSound(),
replacerUid, AudioParams.Default.WithVolume(-4f)); Filter.Pvs(replacerUid), replacerUid, AudioParams.Default.WithVolume(-4f));
} }

View File

@@ -65,9 +65,8 @@ namespace Content.Server.Light.EntitySystems
public void Ignite(MatchstickComponent component, EntityUid user) public void Ignite(MatchstickComponent component, EntityUid user)
{ {
// Play Sound // Play Sound
SoundSystem.Play( SoundSystem.Play(component.IgniteSound.GetSound(), Filter.Pvs(component.Owner),
Filter.Pvs(component.Owner), component.IgniteSound.GetSound(), component.Owner, component.Owner, AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f));
AudioHelpers.WithVariation(0.125f).WithVolume(-0.125f));
// Change state // Change state
SetState(component, SmokableState.Lit); SetState(component, SmokableState.Lit);

View File

@@ -114,7 +114,7 @@ namespace Content.Server.Light.EntitySystems
_adminLogger.Add(LogType.Damaged, _adminLogger.Add(LogType.Damaged,
$"{ToPrettyString(args.User):user} burned their hand on {ToPrettyString(args.Target):target} and received {damage.Total:damage} damage"); $"{ToPrettyString(args.User):user} burned their hand on {ToPrettyString(args.Target):target} and received {damage.Total:damage} damage");
SoundSystem.Play(Filter.Pvs(uid), light.BurnHandSound.GetSound(), uid); SoundSystem.Play(light.BurnHandSound.GetSound(), Filter.Pvs(uid), uid);
args.Handled = true; args.Handled = true;
return; return;
@@ -253,7 +253,7 @@ namespace Content.Server.Light.EntitySystems
if (time > light.LastThunk + ThunkDelay) if (time > light.LastThunk + ThunkDelay)
{ {
light.LastThunk = time; light.LastThunk = time;
SoundSystem.Play(Filter.Pvs(uid), light.TurnOnSound.GetSound(), uid, AudioParams.Default.WithVolume(-10f)); SoundSystem.Play(light.TurnOnSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-10f));
} }
} }
else else

View File

@@ -63,7 +63,7 @@ namespace Content.Server.Light.EntitySystems
if (EntityManager.TryGetComponent(flashlight.Owner, out AppearanceComponent? appearance)) if (EntityManager.TryGetComponent(flashlight.Owner, out AppearanceComponent? appearance))
appearance.SetData(UnpoweredFlashlightVisuals.LightOn, flashlight.LightOn); appearance.SetData(UnpoweredFlashlightVisuals.LightOn, flashlight.LightOn);
SoundSystem.Play(Filter.Pvs(light.Owner), flashlight.ToggleSound.GetSound(), flashlight.Owner); SoundSystem.Play(flashlight.ToggleSound.GetSound(), Filter.Pvs(light.Owner), flashlight.Owner);
RaiseLocalEvent(flashlight.Owner, new LightToggleEvent(flashlight.LightOn)); RaiseLocalEvent(flashlight.Owner, new LightToggleEvent(flashlight.LightOn));
_actionsSystem.SetToggled(flashlight.ToggleAction, flashlight.LightOn); _actionsSystem.SetToggled(flashlight.ToggleAction, flashlight.LightOn);

View File

@@ -82,7 +82,7 @@ namespace Content.Server.Lock
if(lockComp.LockSound != null) if(lockComp.LockSound != null)
{ {
SoundSystem.Play(Filter.Pvs(lockComp.Owner), lockComp.LockSound.GetSound(), lockComp.Owner, AudioParams.Default.WithVolume(-5)); SoundSystem.Play(lockComp.LockSound.GetSound(), Filter.Pvs(lockComp.Owner), lockComp.Owner, AudioParams.Default.WithVolume(-5));
} }
if (EntityManager.TryGetComponent(lockComp.Owner, out AppearanceComponent? appearanceComp)) if (EntityManager.TryGetComponent(lockComp.Owner, out AppearanceComponent? appearanceComp))
@@ -105,7 +105,7 @@ namespace Content.Server.Lock
if (lockComp.UnlockSound != null) if (lockComp.UnlockSound != null)
{ {
SoundSystem.Play(Filter.Pvs(lockComp.Owner), lockComp.UnlockSound.GetSound(), lockComp.Owner, AudioParams.Default.WithVolume(-5)); SoundSystem.Play(lockComp.UnlockSound.GetSound(), Filter.Pvs(lockComp.Owner), lockComp.Owner, AudioParams.Default.WithVolume(-5));
} }
if (EntityManager.TryGetComponent(lockComp.Owner, out AppearanceComponent? appearanceComp)) if (EntityManager.TryGetComponent(lockComp.Owner, out AppearanceComponent? appearanceComp))
@@ -186,7 +186,7 @@ namespace Content.Server.Lock
{ {
if (component.UnlockSound != null) if (component.UnlockSound != null)
{ {
SoundSystem.Play(Filter.Pvs(component.Owner), component.UnlockSound.GetSound(), component.Owner, AudioParams.Default.WithVolume(-5)); SoundSystem.Play(component.UnlockSound.GetSound(), Filter.Pvs(component.Owner), component.Owner, AudioParams.Default.WithVolume(-5));
} }
if (EntityManager.TryGetComponent(component.Owner, out AppearanceComponent? appearanceComp)) if (EntityManager.TryGetComponent(component.Owner, out AppearanceComponent? appearanceComp))

View File

@@ -215,7 +215,7 @@ public sealed class MagicSystem : EntitySystem
transform.WorldPosition = args.Target.Position; transform.WorldPosition = args.Target.Position;
transform.AttachToGridOrMap(); transform.AttachToGridOrMap();
SoundSystem.Play(Filter.Pvs(args.Target), args.BlinkSound.GetSound()); SoundSystem.Play(args.BlinkSound.GetSound(), Filter.Pvs(args.Target));
args.Handled = true; args.Handled = true;
} }
@@ -232,7 +232,7 @@ public sealed class MagicSystem : EntitySystem
var transform = Transform(args.Performer); var transform = Transform(args.Performer);
var coords = transform.Coordinates; var coords = transform.Coordinates;
SoundSystem.Play(Filter.Pvs(coords), args.KnockSound.GetSound(), AudioParams.Default.WithVolume(args.KnockVolume)); SoundSystem.Play(args.KnockSound.GetSound(), Filter.Pvs(coords), AudioParams.Default.WithVolume(args.KnockVolume));
//Look for doors and don't open them if they're already open. //Look for doors and don't open them if they're already open.
foreach (var entity in _lookup.GetEntitiesInRange(coords, args.Range)) foreach (var entity in _lookup.GetEntitiesInRange(coords, args.Range))

View File

@@ -65,7 +65,7 @@ public sealed class HealingSystem : EntitySystem
if (args.Component.HealingEndSound != null) if (args.Component.HealingEndSound != null)
{ {
SoundSystem.Play(Filter.Pvs(uid, entityManager:EntityManager), args.Component.HealingEndSound.GetSound(), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f)); SoundSystem.Play(args.Component.HealingEndSound.GetSound(), Filter.Pvs(uid, entityManager:EntityManager), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f));
} }
} }
@@ -119,7 +119,7 @@ public sealed class HealingSystem : EntitySystem
if (component.HealingBeginSound != null) if (component.HealingBeginSound != null)
{ {
SoundSystem.Play(Filter.Pvs(uid, entityManager:EntityManager), component.HealingBeginSound.GetSound(), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f)); SoundSystem.Play(component.HealingBeginSound.GetSound(), Filter.Pvs(uid, entityManager:EntityManager), uid, AudioHelpers.WithVariation(0.125f).WithVolume(-5f));
} }
_doAfter.DoAfter(new DoAfterEventArgs(user, component.Delay, component.CancelToken.Token, target) _doAfter.DoAfter(new DoAfterEventArgs(user, component.Delay, component.CancelToken.Token, target)

View File

@@ -50,7 +50,7 @@ namespace Content.Server.Medical
var puddleComp = Comp<PuddleComponent>(puddle); var puddleComp = Comp<PuddleComponent>(puddle);
SoundSystem.Play(Filter.Pvs(uid), "/Audio/Effects/Diseases/vomiting.ogg", uid, AudioHelpers.WithVariation(0.2f).WithVolume(-4f)); SoundSystem.Play("/Audio/Effects/Diseases/vomiting.ogg", Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.2f).WithVolume(-4f));
_popupSystem.PopupEntity(Loc.GetString("disease-vomit", ("person", uid)), uid, Filter.Pvs(uid)); _popupSystem.PopupEntity(Loc.GetString("disease-vomit", ("person", uid)), uid, Filter.Pvs(uid));
// Get the solution of the puddle we spawned // Get the solution of the puddle we spawned

View File

@@ -48,7 +48,7 @@ namespace Content.Server.Morgue.Components
if (Cooking) return; if (Cooking) return;
if (Open) return; if (Open) return;
SoundSystem.Play(Filter.Pvs(Owner), _cremateStartSound.GetSound(), Owner); SoundSystem.Play(_cremateStartSound.GetSound(), Filter.Pvs(Owner), Owner);
Cremate(); Cremate();
} }
@@ -62,7 +62,7 @@ namespace Content.Server.Morgue.Components
appearanceComponent.SetData(CrematoriumVisuals.Burning, true); appearanceComponent.SetData(CrematoriumVisuals.Burning, true);
Cooking = true; Cooking = true;
SoundSystem.Play(Filter.Pvs(Owner), _crematingSound.GetSound(), Owner); SoundSystem.Play(_crematingSound.GetSound(), Filter.Pvs(Owner), Owner);
_cremateCancelToken?.Cancel(); _cremateCancelToken?.Cancel();
@@ -90,7 +90,7 @@ namespace Content.Server.Morgue.Components
TryOpenStorage(Owner); TryOpenStorage(Owner);
SoundSystem.Play(Filter.Pvs(Owner), _cremateFinishSound.GetSound(), Owner); SoundSystem.Play(_cremateFinishSound.GetSound(), Filter.Pvs(Owner), Owner);
}, _cremateCancelToken.Token); }, _cremateCancelToken.Token);
} }

View File

@@ -166,7 +166,7 @@ namespace Content.Server.Morgue.Components
if (DoSoulBeep && _entMan.TryGetComponent<AppearanceComponent>(Owner, out var appearance) && if (DoSoulBeep && _entMan.TryGetComponent<AppearanceComponent>(Owner, out var appearance) &&
appearance.TryGetData(MorgueVisuals.HasSoul, out bool hasSoul) && hasSoul) appearance.TryGetData(MorgueVisuals.HasSoul, out bool hasSoul) && hasSoul)
{ {
SoundSystem.Play(Filter.Pvs(Owner), _occupantHasSoulAlarmSound.GetSound(), Owner); SoundSystem.Play(_occupantHasSoulAlarmSound.GetSound(), Filter.Pvs(Owner), Owner);
} }
} }
} }

View File

@@ -216,7 +216,7 @@ namespace Content.Server.Nuke
// play alert sound if time is running out // play alert sound if time is running out
if (nuke.RemainingTime <= nuke.AlertSoundTime && !nuke.PlayedAlertSound) if (nuke.RemainingTime <= nuke.AlertSoundTime && !nuke.PlayedAlertSound)
{ {
nuke.AlertAudioStream = SoundSystem.Play(Filter.Broadcast(), nuke.AlertSound.GetSound()); nuke.AlertAudioStream = SoundSystem.Play(nuke.AlertSound.GetSound(), Filter.Broadcast());
nuke.PlayedAlertSound = true; nuke.PlayedAlertSound = true;
} }
@@ -312,8 +312,8 @@ namespace Content.Server.Nuke
if (!Resolve(uid, ref component)) if (!Resolve(uid, ref component))
return; return;
SoundSystem.Play(Filter.Pvs(uid), sound.GetSound(), SoundSystem.Play(sound.GetSound(),
uid, AudioHelpers.WithVariation(varyPitch).WithVolume(-5f)); Filter.Pvs(uid), uid, AudioHelpers.WithVariation(varyPitch).WithVolume(-5f));
} }
#region Public API #region Public API
@@ -344,7 +344,7 @@ namespace Content.Server.Nuke
_chatSystem.DispatchStationAnnouncement(uid, announcement, sender, false, Color.Red); _chatSystem.DispatchStationAnnouncement(uid, announcement, sender, false, Color.Red);
// todo: move it to announcements system // todo: move it to announcements system
SoundSystem.Play(Filter.Broadcast(), component.ArmSound.GetSound()); SoundSystem.Play(component.ArmSound.GetSound(), Filter.Broadcast());
component.Status = NukeStatus.ARMED; component.Status = NukeStatus.ARMED;
UpdateUserInterface(uid, component); UpdateUserInterface(uid, component);
@@ -373,7 +373,7 @@ namespace Content.Server.Nuke
_chatSystem.DispatchStationAnnouncement(uid, announcement, sender, false); _chatSystem.DispatchStationAnnouncement(uid, announcement, sender, false);
// todo: move it to announcements system // todo: move it to announcements system
SoundSystem.Play(Filter.Broadcast(), component.DisarmSound.GetSound()); SoundSystem.Play(component.DisarmSound.GetSound(), Filter.Broadcast());
// disable sound and reset it // disable sound and reset it
component.PlayedAlertSound = false; component.PlayedAlertSound = false;

View File

@@ -21,7 +21,7 @@ namespace Content.Server.Nutrition.EntitySystems
protected override void SplattedCreamPie(EntityUid uid, CreamPieComponent creamPie) protected override void SplattedCreamPie(EntityUid uid, CreamPieComponent creamPie)
{ {
SoundSystem.Play(Filter.Pvs(creamPie.Owner), creamPie.Sound.GetSound(), creamPie.Owner, AudioHelpers.WithVariation(0.125f)); SoundSystem.Play(creamPie.Sound.GetSound(), Filter.Pvs(creamPie.Owner), creamPie.Owner, AudioHelpers.WithVariation(0.125f));
if (EntityManager.TryGetComponent<FoodComponent?>(creamPie.Owner, out var foodComp) && _solutionsSystem.TryGetSolution(creamPie.Owner, foodComp.SolutionName, out var solution)) if (EntityManager.TryGetComponent<FoodComponent?>(creamPie.Owner, out var foodComp) && _solutionsSystem.TryGetSolution(creamPie.Owner, foodComp.SolutionName, out var solution))
{ {

View File

@@ -110,7 +110,7 @@ namespace Content.Server.Nutrition.EntitySystems
if (!component.Opened) if (!component.Opened)
{ {
//Do the opening stuff like playing the sounds. //Do the opening stuff like playing the sounds.
SoundSystem.Play(Filter.Pvs(args.User), component.OpenSounds.GetSound(), args.User, AudioParams.Default); SoundSystem.Play(component.OpenSounds.GetSound(), Filter.Pvs(args.User), args.User, AudioParams.Default);
SetOpen(uid, true, component); SetOpen(uid, true, component);
return; return;
@@ -132,7 +132,7 @@ namespace Content.Server.Nutrition.EntitySystems
var solution = _solutionContainerSystem.Drain(uid, interactions, interactions.DrainAvailable); var solution = _solutionContainerSystem.Drain(uid, interactions, interactions.DrainAvailable);
_spillableSystem.SpillAt(uid, solution, "PuddleSmear"); _spillableSystem.SpillAt(uid, solution, "PuddleSmear");
SoundSystem.Play(Filter.Pvs(uid), component.BurstSound.GetSound(), uid, AudioParams.Default.WithVolume(-4)); SoundSystem.Play(component.BurstSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-4));
} }
} }
@@ -314,7 +314,7 @@ namespace Content.Server.Nutrition.EntitySystems
Loc.GetString("drink-component-try-use-drink-success-slurp"), args.User, Filter.Pvs(args.User)); Loc.GetString("drink-component-try-use-drink-success-slurp"), args.User, Filter.Pvs(args.User));
} }
SoundSystem.Play(Filter.Pvs(uid), args.Drink.UseSound.GetSound(), uid, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(args.Drink.UseSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-2f));
drained.DoEntityReaction(uid, ReactionMethod.Ingestion); drained.DoEntityReaction(uid, ReactionMethod.Ingestion);
_stomachSystem.TryTransferSolution(firstStomach.Value.Comp.Owner, drained, firstStomach.Value.Comp); _stomachSystem.TryTransferSolution(firstStomach.Value.Comp.Owner, drained, firstStomach.Value.Comp);

View File

@@ -196,7 +196,7 @@ namespace Content.Server.Nutrition.EntitySystems
_popupSystem.PopupEntity(Loc.GetString(args.Food.EatMessage, ("food", args.Food.Owner)), args.User, Filter.Entities(args.User)); _popupSystem.PopupEntity(Loc.GetString(args.Food.EatMessage, ("food", args.Food.Owner)), args.User, Filter.Entities(args.User));
} }
SoundSystem.Play(Filter.Pvs(uid), args.Food.UseSound.GetSound(), uid, AudioParams.Default.WithVolume(-1f)); SoundSystem.Play(args.Food.UseSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-1f));
// Try to break all used utensils // Try to break all used utensils
foreach (var utensil in args.Utensils) foreach (var utensil in args.Utensils)
@@ -299,7 +299,7 @@ namespace Content.Server.Nutrition.EntitySystems
foodSolution.DoEntityReaction(uid, ReactionMethod.Ingestion); foodSolution.DoEntityReaction(uid, ReactionMethod.Ingestion);
_stomachSystem.TryTransferSolution(((IComponent) firstStomach.Value.Comp).Owner, foodSolution, firstStomach.Value.Comp); _stomachSystem.TryTransferSolution(((IComponent) firstStomach.Value.Comp).Owner, foodSolution, firstStomach.Value.Comp);
SoundSystem.Play(Filter.Pvs(target), food.UseSound.GetSound(), target, AudioParams.Default.WithVolume(-1f)); SoundSystem.Play(food.UseSound.GetSound(), Filter.Pvs(target), target, AudioParams.Default.WithVolume(-1f));
if (string.IsNullOrEmpty(food.TrashPrototype)) if (string.IsNullOrEmpty(food.TrashPrototype))
EntityManager.QueueDeleteEntity(food.Owner); EntityManager.QueueDeleteEntity(food.Owner);

View File

@@ -72,8 +72,8 @@ namespace Content.Server.Nutrition.EntitySystems
} }
} }
SoundSystem.Play(Filter.Pvs(uid), component.Sound.GetSound(), transform.Coordinates, SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(uid),
AudioParams.Default.WithVolume(-2)); transform.Coordinates, AudioParams.Default.WithVolume(-2));
component.Count--; component.Count--;
// If someone makes food proto with 1 slice... // If someone makes food proto with 1 slice...

View File

@@ -66,7 +66,7 @@ namespace Content.Server.Nutrition.EntitySystems
if (_robustRandom.Prob(component.BreakChance)) if (_robustRandom.Prob(component.BreakChance))
{ {
SoundSystem.Play(Filter.Pvs(userUid), component.BreakSound.GetSound(), userUid, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(component.BreakSound.GetSound(), Filter.Pvs(userUid), userUid, AudioParams.Default.WithVolume(-2f));
EntityManager.DeleteEntity(component.Owner); EntityManager.DeleteEntity(component.Owner);
} }
} }

View File

@@ -106,11 +106,9 @@ namespace Content.Server.PDA.Ringer
ringer.TimeElapsed -= NoteDelay; ringer.TimeElapsed -= NoteDelay;
var ringerXform = Transform(ringer.Owner); var ringerXform = Transform(ringer.Owner);
SoundSystem.Play( SoundSystem.Play(GetSound(ringer.Ringtone[ringer.NoteCount]),
Filter.Empty().AddInRange(ringerXform.MapPosition, ringer.Range), Filter.Empty().AddInRange(ringerXform.MapPosition, ringer.Range),
GetSound(ringer.Ringtone[ringer.NoteCount]), ringer.Owner, AudioParams.Default.WithMaxDistance(ringer.Range).WithVolume(ringer.Volume));
ringer.Owner,
AudioParams.Default.WithMaxDistance(ringer.Range).WithVolume(ringer.Volume));
ringer.NoteCount++; ringer.NoteCount++;

View File

@@ -58,7 +58,7 @@ namespace Content.Server.Plants.Systems
if (!Resolve(uid, ref component)) if (!Resolve(uid, ref component))
return; return;
SoundSystem.Play(Filter.Pvs(uid), component.RustleSound.GetSound(), uid, AudioHelpers.WithVariation(0.25f)); SoundSystem.Play(component.RustleSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.25f));
} }
} }
} }

View File

@@ -161,7 +161,7 @@ namespace Content.Server.PneumaticCannon
{ {
args.User.PopupMessage(Loc.GetString("pneumatic-cannon-component-fire-no-gas", args.User.PopupMessage(Loc.GetString("pneumatic-cannon-component-fire-no-gas",
("cannon", component.Owner))); ("cannon", component.Owner)));
SoundSystem.Play(Filter.Pvs(args.Used), "/Audio/Items/hiss.ogg", args.Used, AudioParams.Default); SoundSystem.Play("/Audio/Items/hiss.ogg", Filter.Pvs(args.Used), args.Used, AudioParams.Default);
return; return;
} }
AddToQueue(component, args.User, args.ClickLocation); AddToQueue(component, args.User, args.ClickLocation);
@@ -174,7 +174,7 @@ namespace Content.Server.PneumaticCannon
if (storage.StoredEntities == null) return; if (storage.StoredEntities == null) return;
if (storage.StoredEntities.Count == 0) if (storage.StoredEntities.Count == 0)
{ {
SoundSystem.Play(Filter.Pvs((comp).Owner), "/Audio/Weapons/click.ogg", ((IComponent) comp).Owner, AudioParams.Default); SoundSystem.Play("/Audio/Weapons/click.ogg", Filter.Pvs((comp).Owner), ((IComponent) comp).Owner, AudioParams.Default);
return; return;
} }
@@ -211,7 +211,7 @@ namespace Content.Server.PneumaticCannon
{ {
data.User.PopupMessage(Loc.GetString("pneumatic-cannon-component-fire-no-gas", data.User.PopupMessage(Loc.GetString("pneumatic-cannon-component-fire-no-gas",
("cannon", comp.Owner))); ("cannon", comp.Owner)));
SoundSystem.Play(Filter.Pvs(((IComponent) comp).Owner), "/Audio/Items/hiss.ogg", ((IComponent) comp).Owner, AudioParams.Default); SoundSystem.Play("/Audio/Items/hiss.ogg", Filter.Pvs(((IComponent) comp).Owner), ((IComponent) comp).Owner, AudioParams.Default);
return; return;
} }
@@ -227,7 +227,7 @@ namespace Content.Server.PneumaticCannon
var ent = _random.Pick(storage.StoredEntities); var ent = _random.Pick(storage.StoredEntities);
_storageSystem.RemoveAndDrop(comp.Owner, ent, storage); _storageSystem.RemoveAndDrop(comp.Owner, ent, storage);
SoundSystem.Play(Filter.Pvs(data.User), comp.FireSound.GetSound(), ((IComponent) comp).Owner, AudioParams.Default); SoundSystem.Play(comp.FireSound.GetSound(), Filter.Pvs(data.User), ((IComponent) comp).Owner, AudioParams.Default);
if (EntityManager.HasComponent<CameraRecoilComponent>(data.User)) if (EntityManager.HasComponent<CameraRecoilComponent>(data.User))
{ {
var kick = Vector2.One * data.Strength; var kick = Vector2.One * data.Strength;

View File

@@ -68,7 +68,7 @@ namespace Content.Server.Power.EntitySystems
battery.CanDischarge = apc.MainBreakerEnabled; battery.CanDischarge = apc.MainBreakerEnabled;
UpdateUIState(uid, apc); UpdateUIState(uid, apc);
SoundSystem.Play(Filter.Pvs(uid), apc.OnReceiveMessageSound.GetSound(), uid, AudioParams.Default.WithVolume(-2f)); SoundSystem.Play(apc.OnReceiveMessageSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-2f));
} }
private void OnEmagged(EntityUid uid, ApcComponent comp, GotEmaggedEvent args) private void OnEmagged(EntityUid uid, ApcComponent comp, GotEmaggedEvent args)

View File

@@ -149,7 +149,7 @@ namespace Content.Server.RCD.Systems
return; //I don't know why this would happen, but sure I guess. Get out of here invalid state! return; //I don't know why this would happen, but sure I guess. Get out of here invalid state!
} }
SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), rcd.SuccessSound.GetSound(), rcd.Owner); SoundSystem.Play(rcd.SuccessSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), rcd.Owner);
rcd.CurrentAmmo--; rcd.CurrentAmmo--;
args.Handled = true; args.Handled = true;
} }
@@ -240,7 +240,7 @@ namespace Content.Server.RCD.Systems
private void NextMode(EntityUid uid, RCDComponent rcd, EntityUid user) private void NextMode(EntityUid uid, RCDComponent rcd, EntityUid user)
{ {
SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), rcd.SwapModeSound.GetSound(), uid); SoundSystem.Play(rcd.SwapModeSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), uid);
var mode = (int) rcd.Mode; var mode = (int) rcd.Mode;
mode = ++mode % RCDModeCount; mode = ++mode % RCDModeCount;

View File

@@ -80,7 +80,7 @@ namespace Content.Server.Radiation
_endTime = currentTime + TimeSpan.FromSeconds(_duration); _endTime = currentTime + TimeSpan.FromSeconds(_duration);
} }
SoundSystem.Play(Filter.Pvs(Owner), Sound.GetSound(), Owner); SoundSystem.Play(Sound.GetSound(), Filter.Pvs(Owner), Owner);
Dirty(); Dirty();
} }

Some files were not shown because too many files have changed in this diff Show More