Cleanup: Use `SoundCollectionSpecifier instead of string literals in PowerGridCheckRule` (#35449)
* Cleanup * Update * . * Volume
This commit is contained in:
@@ -1,11 +1,24 @@
|
||||
using System.Threading;
|
||||
using Content.Server.StationEvents.Events;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.Prototypes;
|
||||
|
||||
namespace Content.Server.StationEvents.Components;
|
||||
|
||||
[RegisterComponent, Access(typeof(PowerGridCheckRule))]
|
||||
public sealed partial class PowerGridCheckRuleComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
/// Default sound of the announcement when power is back on.
|
||||
/// </summary>
|
||||
private static readonly ProtoId<SoundCollectionPrototype> DefaultPowerOn = new("PowerOn");
|
||||
|
||||
/// <summary>
|
||||
/// Sound of the announcement to play when power is back on.
|
||||
/// </summary>
|
||||
[DataField]
|
||||
public SoundSpecifier PowerOnSound = new SoundCollectionSpecifier(DefaultPowerOn, AudioParams.Default.WithVolume(-4f));
|
||||
|
||||
public CancellationTokenSource? AnnounceCancelToken;
|
||||
|
||||
public EntityUid AffectedStation;
|
||||
|
||||
Reference in New Issue
Block a user