From 399692341d7523d3e88e88be7b824018935e2e2f Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Fri, 30 Mar 2018 17:04:46 +0200 Subject: [PATCH] Add a new AddNode(MiniYamlNode) overload to UpdateUtils --- OpenRA.Mods.Common/UpdateRules/UpdateUtils.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/OpenRA.Mods.Common/UpdateRules/UpdateUtils.cs b/OpenRA.Mods.Common/UpdateRules/UpdateUtils.cs index 26c62cd35a..5895572b53 100644 --- a/OpenRA.Mods.Common/UpdateRules/UpdateUtils.cs +++ b/OpenRA.Mods.Common/UpdateRules/UpdateUtils.cs @@ -254,6 +254,11 @@ namespace OpenRA.Mods.Common.UpdateRules node.Value.Nodes.Add(new MiniYamlNode(key, FieldSaver.FormatValue(value))); } + public static void AddNode(this MiniYamlNode node, MiniYamlNode toAdd) + { + node.Value.Nodes.Add(toAdd); + } + /// Removes children with keys equal to [match] or [match]@[arbitrary suffix] public static int RemoveNodes(this MiniYamlNode node, string match) {