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)
SoundSystem.Play(Filter.Local(), action.Sound.GetSound(), user, action.AudioParams);
SoundSystem.Play(action.Sound.GetSound(), Filter.Local(), user, action.AudioParams);
return performedAction;
}

View File

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

View File

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

View File

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

View File

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

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)
{
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))
return;
SoundSystem.Play(Filter.Empty(), RestartSound);
SoundSystem.Play(RestartSound, Filter.Empty());
// Cleanup the sound, we only want it to play when the round restarts after it ends normally.
RestartSound = null;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -39,7 +39,7 @@ namespace Content.Server.AirlockPainter
if (TryComp<AppearanceComponent>(ev.Target, out var appearance) &&
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);
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -23,7 +23,7 @@ namespace Content.Server.Construction.Completions
public void PerformAction(EntityUid uid, EntityUid? userUid, IEntityManager entityManager)
{
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;
if (component.UseSound != null)
SoundSystem.Play(Filter.Pvs(uid), component.UseSound.GetSound(), uid, AudioHelpers.WithVariation(0.125f));
SoundSystem.Play(component.UseSound.GetSound(), Filter.Pvs(uid), uid, AudioHelpers.WithVariation(0.125f));
// Decrease "Ammo"
component.Charges--;

View File

@@ -216,11 +216,11 @@ namespace Content.Server.Cuffs.Components
if (isOwner)
{
SoundSystem.Play(Filter.Pvs(Owner), cuff.StartBreakoutSound.GetSound(), Owner);
SoundSystem.Play(cuff.StartBreakoutSound.GetSound(), Filter.Pvs(Owner), Owner);
}
else
{
SoundSystem.Play(Filter.Pvs(Owner), cuff.StartUncuffSound.GetSound(), Owner);
SoundSystem.Play(cuff.StartUncuffSound.GetSound(), Filter.Pvs(Owner), Owner);
}
var uncuffTime = isOwner ? cuff.BreakoutTime : cuff.UncuffTime;
@@ -242,7 +242,7 @@ namespace Content.Server.Cuffs.Components
if (result != DoAfterStatus.Cancelled)
{
SoundSystem.Play(Filter.Pvs(Owner), cuff.EndUncuffSound.GetSound(), Owner);
SoundSystem.Play(cuff.EndUncuffSound.GetSound(), Filter.Pvs(Owner), Owner);
Container.ForceRemove(cuffsToRemove.Value);
var transform = _entMan.GetComponent<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(target, Loc.GetString("handcuff-component-start-cuffing-by-other-message",("otherName", eventArgs.User)));
}
SoundSystem.Play(Filter.Pvs(Owner), StartCuffSound.GetSound(), Owner);
SoundSystem.Play(StartCuffSound.GetSound(), Filter.Pvs(Owner), Owner);
TryUpdateCuff(eventArgs.User, target, cuffed);
return true;
@@ -215,7 +215,7 @@ namespace Content.Server.Cuffs.Components
{
if (cuffs.TryAddNewCuffs(user, Owner))
{
SoundSystem.Play(Filter.Pvs(Owner), EndCuffSound.GetSound(), Owner);
SoundSystem.Play(EndCuffSound.GetSound(), Filter.Pvs(Owner), Owner);
if (target == user)
{
user.PopupMessage(Loc.GetString("handcuff-component-cuff-self-success-message"));

View File

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

View File

@@ -17,7 +17,7 @@ namespace Content.Server.Destructible.Thresholds.Behaviors
public void Execute(EntityUid owner, DestructibleSystem system)
{
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))
return true;
SoundSystem.Play(Filter.Pvs(user.Value), component.SoundNoAccess.GetSound(), target, AudioParams.Default.WithVolume(-2f).WithPitchScale(1.2f));
SoundSystem.Play(component.SoundNoAccess.GetSound(), Filter.Pvs(user.Value), target, AudioParams.Default.WithVolume(-2f).WithPitchScale(1.2f));
_popupSystem.PopupEntity(Loc.GetString("network-configurator-device-access-denied"), target, Filter.Entities(user.Value));
return false;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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;
}
@@ -169,7 +169,7 @@ namespace Content.Server.Flash
}
if (sound != null)
{
SoundSystem.Play(Filter.Pvs(transform), sound.GetSound(), transform.Coordinates);
SoundSystem.Play(sound.GetSound(), Filter.Pvs(transform), transform.Coordinates);
}
}

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

View File

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

View File

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

View File

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

View File

@@ -216,7 +216,7 @@ public sealed class SuspicionRuleSystem : GameRuleSystem
var filter = Filter.Empty()
.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;

View File

@@ -192,7 +192,7 @@ public sealed class TraitorRuleSystem : GameRuleSystem
traitor.Mind.Briefing = Loc.GetString("traitor-role-codewords", ("codewords", string.Join(", ",codewords)));
}
SoundSystem.Play(Filter.Empty().AddWhere(s => ((IPlayerSession)s).Data.ContentData()?.Mind?.HasRole<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)

View File

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

View File

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

View File

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

View File

@@ -77,7 +77,7 @@ public sealed class ImmovableRodSystem : EntitySystem
if (_random.Prob(component.HitSoundProbability))
{
SoundSystem.Play(Filter.Pvs(uid), component.Sound.GetSound(), uid, component.Sound.Params);
SoundSystem.Play(component.Sound.GetSound(), Filter.Pvs(uid), uid, component.Sound.Params);
}
if (HasComp<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 (component.SoundPerceivedByOthers)
SoundSystem.Play(Filter.Pvs(args.Target), sfx, args.Target); //play for everyone in range
SoundSystem.Play(sfx, Filter.Pvs(args.Target), args.Target); //play for everyone in range
else
SoundSystem.Play(Filter.Entities(args.User, args.Target), sfx, args.Target); //play only for the initiating entity and its target.
SoundSystem.Play(sfx, Filter.Entities(args.User, args.Target), args.Target); //play only for the initiating entity and its target.
}
component.LastInteractTime = curTime;

View File

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

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.
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,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -50,7 +50,7 @@ namespace Content.Server.Medical
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));
// Get the solution of the puddle we spawned

View File

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

View File

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

View File

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

View File

@@ -21,7 +21,7 @@ namespace Content.Server.Nutrition.EntitySystems
protected override void SplattedCreamPie(EntityUid uid, CreamPieComponent creamPie)
{
SoundSystem.Play(Filter.Pvs(creamPie.Owner), creamPie.Sound.GetSound(), creamPie.Owner, AudioHelpers.WithVariation(0.125f));
SoundSystem.Play(creamPie.Sound.GetSound(), Filter.Pvs(creamPie.Owner), creamPie.Owner, AudioHelpers.WithVariation(0.125f));
if (EntityManager.TryGetComponent<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)
{
//Do the opening stuff like playing the sounds.
SoundSystem.Play(Filter.Pvs(args.User), component.OpenSounds.GetSound(), args.User, AudioParams.Default);
SoundSystem.Play(component.OpenSounds.GetSound(), Filter.Pvs(args.User), args.User, AudioParams.Default);
SetOpen(uid, true, component);
return;
@@ -132,7 +132,7 @@ namespace Content.Server.Nutrition.EntitySystems
var solution = _solutionContainerSystem.Drain(uid, interactions, interactions.DrainAvailable);
_spillableSystem.SpillAt(uid, solution, "PuddleSmear");
SoundSystem.Play(Filter.Pvs(uid), component.BurstSound.GetSound(), uid, AudioParams.Default.WithVolume(-4));
SoundSystem.Play(component.BurstSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-4));
}
}
@@ -314,7 +314,7 @@ namespace Content.Server.Nutrition.EntitySystems
Loc.GetString("drink-component-try-use-drink-success-slurp"), args.User, Filter.Pvs(args.User));
}
SoundSystem.Play(Filter.Pvs(uid), args.Drink.UseSound.GetSound(), uid, AudioParams.Default.WithVolume(-2f));
SoundSystem.Play(args.Drink.UseSound.GetSound(), Filter.Pvs(uid), uid, AudioParams.Default.WithVolume(-2f));
drained.DoEntityReaction(uid, ReactionMethod.Ingestion);
_stomachSystem.TryTransferSolution(firstStomach.Value.Comp.Owner, drained, firstStomach.Value.Comp);

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

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!
}
SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), rcd.SuccessSound.GetSound(), rcd.Owner);
SoundSystem.Play(rcd.SuccessSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), rcd.Owner);
rcd.CurrentAmmo--;
args.Handled = true;
}
@@ -240,7 +240,7 @@ namespace Content.Server.RCD.Systems
private void NextMode(EntityUid uid, RCDComponent rcd, EntityUid user)
{
SoundSystem.Play(Filter.Pvs(uid, entityManager: EntityManager), rcd.SwapModeSound.GetSound(), uid);
SoundSystem.Play(rcd.SwapModeSound.GetSound(), Filter.Pvs(uid, entityManager: EntityManager), uid);
var mode = (int) rcd.Mode;
mode = ++mode % RCDModeCount;

View File

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

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