Footstep sounds. (#182)
This commit is contained in:
committed by
GitHub
parent
85241a7dce
commit
f5bb790edb
28
Content.Shared/Audio/SoundCollectionPrototype.cs
Normal file
28
Content.Shared/Audio/SoundCollectionPrototype.cs
Normal file
@@ -0,0 +1,28 @@
|
||||
using System.Collections.Generic;
|
||||
using SS14.Shared.Prototypes;
|
||||
using SS14.Shared.Utility;
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user