From 9a8e50e82ff847613fe73aa59dc29624b6003b64 Mon Sep 17 00:00:00 2001 From: abcdefg30 Date: Thu, 3 May 2018 15:46:34 +0200 Subject: [PATCH] Add a RemoveNode(MiniYamlNode) method 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 bac5f8d269..aec4c6f2a7 100644 --- a/OpenRA.Mods.Common/UpdateRules/UpdateUtils.cs +++ b/OpenRA.Mods.Common/UpdateRules/UpdateUtils.cs @@ -264,6 +264,11 @@ namespace OpenRA.Mods.Common.UpdateRules node.Value.Nodes.Add(toAdd); } + public static void RemoveNode(this MiniYamlNode node, MiniYamlNode toRemove) + { + node.Value.Nodes.Remove(toRemove); + } + /// Removes children with keys equal to [match] or [match]@[arbitrary suffix] public static int RemoveNodes(this MiniYamlNode node, string match) {