Refactor all references to AudioSystem functions now that the old ones are obsolete. (#1081)

Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
This commit is contained in:
Memory
2020-06-07 08:55:15 -05:00
committed by GitHub
parent b8338bc64c
commit 21c41f28ed
40 changed files with 72 additions and 72 deletions

View File

@@ -86,7 +86,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
if (!Activated || entities.Count == 0 || cell == null || !cell.CanDeductCharge(EnergyPerUse))
return false;
EntitySystem.Get<AudioSystem>().Play("/Audio/weapons/egloves.ogg", Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/weapons/egloves.ogg", Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
foreach (var entity in entities)
{
@@ -101,7 +101,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
cell.DeductCharge(EnergyPerUse);
if(cell.Charge < EnergyPerUse)
{
EntitySystem.Get<AudioSystem>().Play(AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
EntitySystem.Get<AudioSystem>().PlayAtCoords(AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
TurnOff();
}
@@ -132,7 +132,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
var sprite = Owner.GetComponent<SpriteComponent>();
var item = Owner.GetComponent<ItemComponent>();
EntitySystem.Get<AudioSystem>().Play(AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
EntitySystem.Get<AudioSystem>().PlayAtCoords(AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
item.EquippedPrefix = "off";
sprite.LayerSetState(0, "stunbaton_off");
@@ -152,7 +152,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
if (cell == null)
{
EntitySystem.Get<AudioSystem>().Play("/Audio/machines/button.ogg", Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/machines/button.ogg", Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
_notifyManager.PopupMessage(Owner, user, _localizationManager.GetString("Cell missing..."));
return;
@@ -160,12 +160,12 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
if (cell.Charge < EnergyPerUse)
{
EntitySystem.Get<AudioSystem>().Play("/Audio/machines/button.ogg", Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/machines/button.ogg", Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
_notifyManager.PopupMessage(Owner, user, _localizationManager.GetString("Dead cell..."));
return;
}
EntitySystem.Get<AudioSystem>().Play(AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
EntitySystem.Get<AudioSystem>().PlayAtCoords(AudioHelpers.GetRandomFileFromSoundCollection("sparks"), Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
item.EquippedPrefix = "on";
sprite.LayerSetState(0, "stunbaton_on");
@@ -192,7 +192,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
return false;
}
EntitySystem.Get<AudioSystem>().Play("/Audio/items/weapons/pistol_magin.ogg");
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/items/weapons/pistol_magin.ogg", Owner);
Dirty();
@@ -223,7 +223,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
cell.Owner.Transform.GridPosition = user.Transform.GridPosition;
}
EntitySystem.Get<AudioSystem>().Play("/Audio/items/weapons/pistol_magout.ogg", Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
EntitySystem.Get<AudioSystem>().PlayAtCoords("/Audio/items/weapons/pistol_magout.ogg", Owner.Transform.GridPosition, AudioHelpers.WithVariation(0.25f));
}
public void Examine(FormattedMessage message, bool inDetailsRange)