Add a new AddNode(MiniYamlNode) overload to UpdateUtils

This commit is contained in:
abcdefg30
2018-03-30 17:04:46 +02:00
committed by reaperrr
parent 4750188e7b
commit 399692341d

View File

@@ -254,6 +254,11 @@ namespace OpenRA.Mods.Common.UpdateRules
node.Value.Nodes.Add(new MiniYamlNode(key, FieldSaver.FormatValue(value))); node.Value.Nodes.Add(new MiniYamlNode(key, FieldSaver.FormatValue(value)));
} }
public static void AddNode(this MiniYamlNode node, MiniYamlNode toAdd)
{
node.Value.Nodes.Add(toAdd);
}
/// <summary>Removes children with keys equal to [match] or [match]@[arbitrary suffix]</summary> /// <summary>Removes children with keys equal to [match] or [match]@[arbitrary suffix]</summary>
public static int RemoveNodes(this MiniYamlNode node, string match) public static int RemoveNodes(this MiniYamlNode node, string match)
{ {