Sweeping changes/improvements to the microwave. (#997)

Co-authored-by: FL-OZ <anotherscuffed@gmail.com>
Co-authored-by: Pieter-Jan Briers <pieterjan.briers+git@gmail.com>
This commit is contained in:
FL-OZ
2020-05-28 15:28:35 -05:00
committed by GitHub
parent 836953370d
commit 5b36a0d704
8 changed files with 392 additions and 356 deletions

View File

@@ -13,7 +13,6 @@ namespace Content.Client.GameObjects.Components.Kitchen
public sealed class MicrowaveVisualizer : AppearanceVisualizer
{
private SoundComponent _soundComponent;
private const string MicrowaveSoundLoop = "/Audio/machines/microwave_loop.ogg";
public override void OnChangeData(AppearanceComponent component)
{
@@ -38,8 +37,9 @@ namespace Content.Client.GameObjects.Components.Kitchen
var audioParams = AudioParams.Default;
audioParams.Loop = true;
var schedSound = new ScheduledSound();
schedSound.Filename = MicrowaveSoundLoop;
schedSound.Filename = "/Audio/machines/microwave_loop.ogg";
schedSound.AudioParams = audioParams;
_soundComponent.StopAllSounds();
_soundComponent.AddScheduledSound(schedSound);
break;
@@ -51,11 +51,8 @@ namespace Content.Client.GameObjects.Components.Kitchen
var glowingPartsVisible = !(component.TryGetData(PowerDeviceVisuals.Powered, out bool powered) && !powered);
sprite.LayerSetVisible(MicrowaveVisualizerLayers.BaseUnlit, glowingPartsVisible);
}
private enum MicrowaveVisualizerLayers
{
Base,