Sound for burning your hand on a powered light (#733)

This commit is contained in:
py01
2020-02-22 17:39:00 -06:00
committed by GitHub
parent b0e3ab3393
commit ad4dd335b8
2 changed files with 7 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects; using Content.Shared.GameObjects;
using Robust.Server.GameObjects; using Robust.Server.GameObjects;
using Robust.Server.GameObjects.Components.Container; using Robust.Server.GameObjects.Components.Container;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.Audio; using Robust.Shared.Audio;
using Robust.Shared.GameObjects; using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.GameObjects;
@@ -26,6 +27,10 @@ namespace Content.Server.GameObjects.Components.Power
private TimeSpan _lastThunk; private TimeSpan _lastThunk;
#pragma warning disable 649
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
#pragma warning restore 649
private LightBulbType BulbType = LightBulbType.Tube; private LightBulbType BulbType = LightBulbType.Tube;
[ViewVariables] private ContainerSlot _lightBulbContainer; [ViewVariables] private ContainerSlot _lightBulbContainer;
@@ -74,6 +79,8 @@ namespace Content.Server.GameObjects.Components.Power
void Burn() void Burn()
{ {
damageableComponent.TakeDamage(DamageType.Heat, 20, Owner); damageableComponent.TakeDamage(DamageType.Heat, 20, Owner);
var audioSystem = _entitySystemManager.GetEntitySystem<AudioSystem>();
audioSystem.Play("/Audio/effects/lightburn.ogg", Owner);
} }
void Eject() void Eject()

Binary file not shown.