Fix RND console keyboard sound being global. (#933)

* global keyboard

* e

* fixes microwave while im at it

Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
This commit is contained in:
FL-OZ
2020-05-20 12:11:38 -05:00
committed by GitHub
parent 61e4a431a2
commit e1324fff19
2 changed files with 6 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ using Robust.Server.GameObjects.Components.UserInterface;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Server.Interfaces.GameObjects;
using Robust.Server.Interfaces.Player;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Random;
@@ -33,7 +34,7 @@ namespace Content.Server.GameObjects.Components.Research
private const string _soundCollectionName = "keyboard";
private bool Powered => _powerDevice.Powered;
public override void Initialize()
{
base.Initialize();
@@ -119,7 +120,7 @@ namespace Content.Server.GameObjects.Components.Research
var soundCollection = _prototypeManager.Index<SoundCollectionPrototype>(_soundCollectionName);
var file = _random.Pick(soundCollection.PickFiles);
var audioSystem = _entitySystemManager.GetEntitySystem<AudioSystem>();
audioSystem.Play(file);
audioSystem.Play(file,Owner,AudioParams.Default);
}