Adds linting support to SoundCollectionPrototype, fix linter errors.
Closes #4580
This commit is contained in:
@@ -126,7 +126,7 @@ namespace Content.Client.Audio
|
||||
private void StartAmbience()
|
||||
{
|
||||
EndAmbience();
|
||||
var file = _robustRandom.Pick(_ambientCollection.PickFiles);
|
||||
var file = _robustRandom.Pick(_ambientCollection.PickFiles).ToString();
|
||||
_ambientStream = SoundSystem.Play(Filter.Local(), file, _ambientParams);
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace Content.Server.GameTicking
|
||||
public void ChooseRandomLobbySong()
|
||||
{
|
||||
DebugTools.Assert(_lobbyMusicInitialized);
|
||||
SetLobbySong(_robustRandom.Pick(_lobbyMusicCollection.PickFiles));
|
||||
SetLobbySong(_robustRandom.Pick(_lobbyMusicCollection.PickFiles).ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -246,7 +246,7 @@ namespace Content.Server.GameTicking
|
||||
RoundNumberMetric.Inc();
|
||||
|
||||
RunLevel = GameRunLevel.PreRoundLobby;
|
||||
LobbySong = _robustRandom.Pick(_lobbyMusicCollection.PickFiles);
|
||||
LobbySong = _robustRandom.Pick(_lobbyMusicCollection.PickFiles).ToString();
|
||||
ResettingCleanup();
|
||||
PreRoundSetup();
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace Content.Shared.Audio
|
||||
public static string GetRandomFileFromSoundCollection(string name)
|
||||
{
|
||||
var soundCollection = IoCManager.Resolve<IPrototypeManager>().Index<SoundCollectionPrototype>(name);
|
||||
return IoCManager.Resolve<IRobustRandom>().Pick(soundCollection.PickFiles);
|
||||
return IoCManager.Resolve<IRobustRandom>().Pick(soundCollection.PickFiles).ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
using Robust.Shared.Utility;
|
||||
using Robust.Shared.ViewVariables;
|
||||
|
||||
namespace Content.Shared.Audio
|
||||
@@ -12,6 +13,7 @@ namespace Content.Shared.Audio
|
||||
[DataField("id", required: true)]
|
||||
public string ID { get; } = default!;
|
||||
|
||||
[DataField("files")] public List<string> PickFiles { get; } = new();
|
||||
[DataField("files")]
|
||||
public List<ResourcePath> PickFiles { get; } = new();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,11 +55,10 @@
|
||||
- type: soundCollection
|
||||
id: footstep_tile
|
||||
files:
|
||||
- /Audio/Effects/Footsteps/tile1.ogg
|
||||
- /Audio/Effects/Footsteps/tile2.ogg
|
||||
- /Audio/Effects/Footsteps/tile3.ogg
|
||||
- /Audio/Effects/Footsteps/tile4.ogg
|
||||
- /Audio/Effects/Footsteps/tile5.ogg
|
||||
- /Audio/Effects/Footsteps/tile1.wav
|
||||
- /Audio/Effects/Footsteps/tile2.wav
|
||||
- /Audio/Effects/Footsteps/tile3.wav
|
||||
- /Audio/Effects/Footsteps/tile4.wav
|
||||
|
||||
- type: soundCollection
|
||||
id: footstep_clown
|
||||
|
||||
@@ -20,9 +20,9 @@
|
||||
- type: soundCollection
|
||||
id: ScientistScreams
|
||||
files:
|
||||
- /Audio/Voice/Human/science_scream_1.ogg
|
||||
- /Audio/Voice/Human/science_scream_2.ogg
|
||||
- /Audio/Voice/Human/science_scream_3.ogg
|
||||
- /Audio/Voice/Human/science_scream_4.ogg
|
||||
- /Audio/Voice/Human/science_scream_5.ogg
|
||||
- /Audio/Voice/Human/science_scream_6.ogg
|
||||
- /Audio/Voice/Human/science_scream1.ogg
|
||||
- /Audio/Voice/Human/science_scream2.ogg
|
||||
- /Audio/Voice/Human/science_scream3.ogg
|
||||
- /Audio/Voice/Human/science_scream4.ogg
|
||||
- /Audio/Voice/Human/science_scream5.ogg
|
||||
- /Audio/Voice/Human/science_scream6.ogg
|
||||
|
||||
Reference in New Issue
Block a user