Files
tbd-station-14/Content.Shared/Prototypes/DatasetPrototype.cs
Paul Ritter ce096f9c51 ports over datasets (#2663)
* ports over datasets & ignores the dataset prototype clientside

* moved dataset to shared

Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
2021-01-14 18:08:55 +11:00

26 lines
699 B
C#

using System.Collections.Generic;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
using YamlDotNet.RepresentationModel;
namespace Content.Shared.Prototypes
{
[Prototype("dataset")]
public class DatasetPrototype : IPrototype, IIndexedPrototype
{
private string _id;
public string ID => _id;
private List<string> _values;
public IReadOnlyList<string> Values => _values;
public void LoadFrom(YamlMappingNode mapping)
{
var ser = YamlObjectSerializer.NewReader(mapping);
ser.DataField(ref _id, "id", "");
ser.DataField(ref _values, "values", new List<string>());
}
}
}