Let FieldLoader do the hard work of loading fields.

This commit is contained in:
Paul Chote
2014-06-29 11:41:28 +12:00
committed by Matthias Mailänder
parent 352067eb48
commit 3f7293b206
12 changed files with 46 additions and 42 deletions

View File

@@ -32,7 +32,7 @@ namespace OpenRA
public readonly IReadOnlyDictionary<string, string> MapFolders;
public readonly MiniYaml LoadScreen;
public readonly MiniYaml LobbyDefaults;
public readonly IReadOnlyDictionary<string, string> ContentInstaller;
public readonly InstallData ContentInstaller;
public readonly Dictionary<string, Pair<string, int>> Fonts;
public readonly Size TileSize = new Size(24, 24);
public readonly string NewsUrl;
@@ -72,7 +72,10 @@ namespace OpenRA
LoadScreen = yaml["LoadScreen"];
LobbyDefaults = yaml["LobbyDefaults"];
ContentInstaller = YamlDictionary(yaml, "ContentInstaller");
if (yaml.ContainsKey("ContentInstaller"))
ContentInstaller = FieldLoader.Load<InstallData>(yaml["ContentInstaller"]);
Fonts = yaml["Fonts"].ToDictionary(my =>
{
var nd = my.ToDictionary();