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

@@ -274,7 +274,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
(_currentCookTimerTime == (uint)recipeToCook.CookTime) ? true : false;
SetAppearance(MicrowaveVisualState.Cooking);
_audioSystem.Play(_startCookingSound, AudioParams.Default);
_audioSystem.Play(_startCookingSound,Owner, AudioParams.Default);
Timer.Spawn((int)(_currentCookTimerTime * _cookTimeMultiplier), () =>
{
@@ -290,7 +290,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
var entityToSpawn = goodMeal ? recipeToCook.Result : _badRecipeName;
_entityManager.SpawnEntity(entityToSpawn, Owner.Transform.GridPosition);
_audioSystem.Play(_cookingCompleteSound, AudioParams.Default);
_audioSystem.Play(_cookingCompleteSound,Owner, AudioParams.Default);
SetAppearance(MicrowaveVisualState.Idle);
_busy = false;
UpdateUserInterface();
@@ -395,7 +395,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
private void ClickSound()
{
_audioSystem.Play("/Audio/machines/machine_switch.ogg", AudioParams.Default.WithVolume(-2f));
_audioSystem.Play("/Audio/machines/machine_switch.ogg",Owner, AudioParams.Default.WithVolume(-2f));
}

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);
}