Add plumbing for mod-defined sprite loaders.

This commit is contained in:
Paul Chote
2014-10-05 15:01:45 +13:00
parent ad0da91ecc
commit 9cf8328979
8 changed files with 54 additions and 19 deletions

View File

@@ -37,6 +37,8 @@ namespace OpenRA
public readonly Size TileSize = new Size(24, 24);
public readonly TileShape TileShape = TileShape.Rectangle;
public readonly string[] SpriteFormats = { };
[Desc("(x,y,z) offset of the full cell and each sub-cell", "X & Y should be between -512 ... 512 and Z >= 0")]
public readonly WVec[] SubCellOffsets =
{
@@ -128,6 +130,9 @@ namespace OpenRA
compat.Add(c.Trim());
MapCompatibility = compat.ToArray();
if (yaml.ContainsKey("SpriteFormats"))
SpriteFormats = FieldLoader.GetValue<string[]>("SpriteFormats", yaml["SpriteFormats"].Value);
}
static string[] YamlList(Dictionary<string, MiniYaml> yaml, string key)