Content audio (#20862)
This commit is contained in:
@@ -24,6 +24,7 @@ using Content.Shared.Tag;
|
||||
using Robust.Server.Containers;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Containers;
|
||||
using Robust.Shared.Player;
|
||||
|
||||
@@ -73,7 +74,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
SetAppearance(uid, MicrowaveVisualState.Cooking, microwaveComponent);
|
||||
|
||||
microwaveComponent.PlayingStream =
|
||||
_audio.PlayPvs(microwaveComponent.LoopingSound, uid, AudioParams.Default.WithLoop(true).WithMaxDistance(5));
|
||||
_audio.PlayPvs(microwaveComponent.LoopingSound, uid, AudioParams.Default.WithLoop(true).WithMaxDistance(5)).Value.Entity;
|
||||
}
|
||||
|
||||
private void OnCookStop(EntityUid uid, ActiveMicrowaveComponent component, ComponentShutdown args)
|
||||
@@ -82,7 +83,7 @@ namespace Content.Server.Kitchen.EntitySystems
|
||||
return;
|
||||
SetAppearance(uid, MicrowaveVisualState.Idle, microwaveComponent);
|
||||
|
||||
microwaveComponent.PlayingStream?.Stop();
|
||||
microwaveComponent.PlayingStream = _audio.Stop(microwaveComponent.PlayingStream);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user