Adds a sound effect when you unwrap an AME part (#2832)

This commit is contained in:
Swept
2020-12-27 02:11:52 +00:00
committed by GitHub
parent e4e0125c2c
commit 94bb7a165d
2 changed files with 6 additions and 1 deletions

View File

@@ -1,4 +1,4 @@
using System.Threading.Tasks;
using System.Threading.Tasks;
using System.Linq;
using Content.Server.GameObjects.Components.Interactable;
using Content.Server.Interfaces.GameObjects.Components.Items;
@@ -11,6 +11,8 @@ using Robust.Shared.GameObjects.Components.Transform;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
using Robust.Shared.Localization;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects.Systems;
namespace Content.Server.GameObjects.Components.Power.AME
{
@@ -22,6 +24,7 @@ namespace Content.Server.GameObjects.Components.Power.AME
[Dependency] private readonly IServerEntityManager _serverEntityManager = default!;
public override string Name => "AMEPart";
private string _unwrap = "/Audio/Effects/unwrap.ogg";
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs args)
{
@@ -46,6 +49,8 @@ namespace Content.Server.GameObjects.Components.Power.AME
var ent = _serverEntityManager.SpawnEntity("AMEShielding", mapGrid.GridTileToLocal(snapPos));
ent.Transform.LocalRotation = Owner.Transform.LocalRotation;
EntitySystem.Get<AudioSystem>().PlayFromEntity(_unwrap, Owner);
Owner.Delete();
}

Binary file not shown.