Add support for diamond cell grids.

This commit is contained in:
Paul Chote
2014-06-30 11:25:39 +12:00
parent af0e948a67
commit a30c8b53a7
11 changed files with 191 additions and 82 deletions

View File

@@ -16,6 +16,8 @@ using OpenRA.Primitives;
namespace OpenRA
{
public enum TileShape { Rectangle, Diamond }
// Describes what is to be loaded in order to run a mod
public class Manifest
{
@@ -33,6 +35,7 @@ namespace OpenRA
public readonly Dictionary<string, Pair<string, int>> Fonts;
public readonly Size TileSize = new Size(24, 24);
public readonly string NewsUrl;
public readonly TileShape TileShape = TileShape.Rectangle;
public Manifest(string mod)
{
@@ -77,6 +80,9 @@ namespace OpenRA
if (yaml.ContainsKey("TileSize"))
TileSize = FieldLoader.GetValue<Size>("TileSize", yaml["TileSize"].Value);
if (yaml.ContainsKey("TileShape"))
TileShape = FieldLoader.GetValue<TileShape>("TileShape", yaml["TileShape"].Value);
// Allow inherited mods to import parent maps.
var compat = new List<string>();
compat.Add(mod);