From e4c31939d9f526bbf747d7ff057bb7f3ed121b0e Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Sat, 2 Oct 2010 12:15:15 +1300 Subject: [PATCH] Save all settings to settings.yaml, not just non-defaults. --- OpenRA.Game/GameRules/Settings.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/OpenRA.Game/GameRules/Settings.cs b/OpenRA.Game/GameRules/Settings.cs index 74f9f70cde..85b27125e5 100755 --- a/OpenRA.Game/GameRules/Settings.cs +++ b/OpenRA.Game/GameRules/Settings.cs @@ -134,16 +134,11 @@ namespace OpenRA.GameRules { var root = new List(); foreach( var kv in Sections ) - root.Add( new MiniYamlNode( kv.Key, SectionYaml( kv.Value ) ) ); + root.Add( new MiniYamlNode( kv.Key, FieldSaver.Save(kv.Value) ) ); root.WriteToFile(SettingsFile); } - MiniYaml SectionYaml(object section) - { - return FieldSaver.SaveDifferences(section, Activator.CreateInstance(section.GetType())); - } - void LoadSectionYaml(MiniYaml yaml, object section) { object defaults = Activator.CreateInstance(section.GetType());