Add support for diamond cell grids.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user