Unrevert audio (#21330)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
@@ -10,6 +10,8 @@ using Content.Shared.Emag.Systems;
|
||||
using Content.Shared.Nutrition.Components;
|
||||
using Content.Shared.Nutrition.EntitySystems;
|
||||
using Content.Shared.Storage.Components;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Audio.Systems;
|
||||
using Robust.Shared.Timing;
|
||||
|
||||
namespace Content.Server.Nutrition.EntitySystems;
|
||||
@@ -90,7 +92,7 @@ public sealed class FatExtractorSystem : EntitySystem
|
||||
|
||||
component.Processing = true;
|
||||
_appearance.SetData(uid, FatExtractorVisuals.Processing, true);
|
||||
component.Stream = _audio.PlayPvs(component.ProcessSound, uid);
|
||||
component.Stream = _audio.PlayPvs(component.ProcessSound, uid)?.Entity;
|
||||
component.NextUpdate = _timing.CurTime + component.UpdateTime;
|
||||
}
|
||||
|
||||
@@ -104,7 +106,7 @@ public sealed class FatExtractorSystem : EntitySystem
|
||||
|
||||
component.Processing = false;
|
||||
_appearance.SetData(uid, FatExtractorVisuals.Processing, false);
|
||||
component.Stream?.Stop();
|
||||
component.Stream = _audio.Stop(component.Stream);
|
||||
}
|
||||
|
||||
public bool TryGetValidOccupant(EntityUid uid, [NotNullWhen(true)] out EntityUid? occupant, FatExtractorComponent? component = null, EntityStorageComponent? storage = null)
|
||||
|
||||
Reference in New Issue
Block a user