Rename SoundComponent and refactor its wrong usages. (#1036)
* Rename `SoundComponent` and refactor its wrong usages. * Replace verbose IoC grabs with EntitySysetm.Get * unused depend Co-authored-by: FL-OZ <anotherscuffed@gmail.com> Co-authored-by: Víctor Aguilera Puerto <6766154+Zumorica@users.noreply.github.com>
This commit is contained in:
@@ -6,6 +6,7 @@ using Content.Shared.GameObjects;
|
||||
using Content.Shared.GameObjects.Components.Items;
|
||||
using Robust.Server.GameObjects.EntitySystems;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.Interfaces.Physics;
|
||||
@@ -109,7 +110,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee
|
||||
|
||||
if(OnHitEntities(hitEntities)) return;
|
||||
|
||||
var audioSystem = _entitySystemManager.GetEntitySystem<AudioSystem>();
|
||||
var audioSystem = EntitySystem.Get<AudioSystem>();
|
||||
var emitter = hitEntities.Count == 0 ? eventArgs.User : hitEntities[0];
|
||||
audioSystem.Play(hitEntities.Count > 0 ? _hitSound : "/Audio/weapons/punchmiss.ogg", emitter);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user