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

@@ -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);