Override UserSettings from the commandline

This commit is contained in:
Paul Chote
2010-07-03 11:26:27 +12:00
committed by Chris Forbes
parent 4671e6b261
commit 6359674d27
2 changed files with 10 additions and 1 deletions

View File

@@ -52,5 +52,12 @@ namespace OpenRA.GameRules
public readonly int ExternalPort = 1234;
public readonly bool InternetServer = true;
public readonly string MasterServer = "http://open-ra.org/master/";
public void AddSettings(Settings settings)
{
foreach (var f in this.GetType().GetFields())
if (settings.Contains(f.Name))
OpenRA.FileFormats.FieldLoader.LoadField( this, f.Name, settings.GetValue(f.Name, "") );
}
}
}