Sound effect plays when an item is thrown (#2767)
* Adds toss.ogg to the project's resources * Thrown items will now play a sound effect
This commit is contained in:
@@ -1,8 +1,9 @@
|
||||
using Content.Server.GameObjects.EntitySystems.Click;
|
||||
using Content.Server.GameObjects.EntitySystems.Click;
|
||||
using Content.Shared.Damage;
|
||||
using Content.Shared.GameObjects;
|
||||
using Content.Shared.GameObjects.Components.Damage;
|
||||
using Content.Shared.Physics;
|
||||
using Robust.Server.GameObjects.EntitySystems;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components;
|
||||
using Robust.Shared.GameObjects.Components.Timers;
|
||||
@@ -98,6 +99,9 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
||||
var controller = comp.EnsureController<ThrownController>();
|
||||
controller.Push(direction, speed);
|
||||
|
||||
EntitySystem.Get<AudioSystem>()
|
||||
.PlayFromEntity("/Audio/Effects/toss.ogg", Owner);
|
||||
|
||||
StartStopTimer();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user