Files
tbd-station-14/Content.Shared/Prototypes/DatasetPrototype.cs
DrSmugleaf 3e702723fd Content PR for YAML hot reloading (#3319)
* Content PR for YAML hot reloading

* Add CanAdminReloadPrototypes (host permission)

* IndexedPrototype fixes
2021-02-20 00:05:24 +01:00

26 lines
680 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
{
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>());
}
}
}