Unrevert audio (#21330)
Co-authored-by: Pieter-Jan Briers <pieterjan.briers@gmail.com>
This commit is contained in:
@@ -5,6 +5,7 @@ using Content.Shared.Interaction;
|
||||
using Content.Shared.Inventory.Events;
|
||||
using Content.Shared.Radiation.Components;
|
||||
using Content.Shared.Radiation.Systems;
|
||||
using Robust.Server.Audio;
|
||||
using Robust.Server.GameObjects;
|
||||
using Robust.Server.Player;
|
||||
|
||||
@@ -149,7 +150,7 @@ public sealed class GeigerSystem : SharedGeigerSystem
|
||||
if (!Resolve(uid, ref component, false))
|
||||
return;
|
||||
|
||||
component.Stream?.Stop();
|
||||
component.Stream = _audio.Stop(component.Stream);
|
||||
|
||||
if (!component.Sounds.TryGetValue(component.DangerLevel, out var sounds))
|
||||
return;
|
||||
@@ -163,7 +164,7 @@ public sealed class GeigerSystem : SharedGeigerSystem
|
||||
var sound = _audio.GetSound(sounds);
|
||||
var param = sounds.Params.WithLoop(true).WithVolume(-4f);
|
||||
|
||||
component.Stream = _audio.PlayGlobal(sound, session, param);
|
||||
component.Stream = _audio.PlayGlobal(sound, session, param)?.Entity;
|
||||
}
|
||||
|
||||
public static GeigerDangerLevel RadsToLevel(float rads)
|
||||
|
||||
Reference in New Issue
Block a user