Stylecop clean Manifest.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#region Copyright & License Information
|
||||
/*
|
||||
* Copyright 2007-2011 The OpenRA Developers (see AUTHORS)
|
||||
* Copyright 2007-2013 The OpenRA Developers (see AUTHORS)
|
||||
* This file is part of OpenRA, which is free software. It is made
|
||||
* available to you under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation. For more information,
|
||||
@@ -14,8 +14,7 @@ using System.Linq;
|
||||
|
||||
namespace OpenRA.FileFormats
|
||||
{
|
||||
/* describes what is to be loaded in order to run a set of mods */
|
||||
|
||||
// Describes what is to be loaded in order to run a mod
|
||||
public class Manifest
|
||||
{
|
||||
public readonly Mod Mod;
|
||||
@@ -28,12 +27,12 @@ namespace OpenRA.FileFormats
|
||||
public readonly Dictionary<string, string> Packages;
|
||||
public readonly MiniYaml LoadScreen;
|
||||
public readonly MiniYaml LobbyDefaults;
|
||||
public readonly Dictionary<string, Pair<string,int>> Fonts;
|
||||
public readonly Dictionary<string, Pair<string, int>> Fonts;
|
||||
public readonly int TileSize = 24;
|
||||
|
||||
public Manifest(string mod)
|
||||
{
|
||||
var path = new [] { "mods", mod, "mod.yaml" }.Aggregate(Path.Combine);
|
||||
var path = new[] { "mods", mod, "mod.yaml" }.Aggregate(Path.Combine);
|
||||
var yaml = new MiniYaml(null, MiniYaml.FromFile(path)).NodesDict;
|
||||
|
||||
Mod = FieldLoader.Load<Mod>(yaml["Metadata"]);
|
||||
@@ -74,7 +73,7 @@ namespace OpenRA.FileFormats
|
||||
static string[] YamlList(Dictionary<string, MiniYaml> yaml, string key)
|
||||
{
|
||||
if (!yaml.ContainsKey(key))
|
||||
return new string[] {};
|
||||
return new string[] { };
|
||||
|
||||
return yaml[key].NodesDict.Keys.ToArray();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user