2019-04-05 02:04:34 +02:00
|
|
|
using System.Collections.Generic;
|
2019-04-15 21:11:38 -06:00
|
|
|
using Robust.Shared.Prototypes;
|
|
|
|
|
using Robust.Shared.Utility;
|
2019-04-05 02:04:34 +02:00
|
|
|
using YamlDotNet.RepresentationModel;
|
|
|
|
|
|
|
|
|
|
namespace Content.Shared.Audio
|
|
|
|
|
{
|
|
|
|
|
[Prototype("sound_collection")]
|
|
|
|
|
public sealed class SoundCollectionPrototype : IPrototype, IIndexedPrototype
|
|
|
|
|
{
|
|
|
|
|
public string ID { get; private set; }
|
|
|
|
|
public IReadOnlyList<string> PickFiles { get; private set; }
|
|
|
|
|
|
|
|
|
|
public void LoadFrom(YamlMappingNode mapping)
|
|
|
|
|
{
|
|
|
|
|
ID = mapping.GetNode("id").AsString();
|
|
|
|
|
|
|
|
|
|
var pickFiles = new List<string>();
|
|
|
|
|
|
|
|
|
|
foreach (var file in mapping.GetNode<YamlSequenceNode>("files"))
|
|
|
|
|
{
|
|
|
|
|
pickFiles.Add(file.AsString());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
PickFiles = pickFiles;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|