Load subcells and default subcell index from mod.yaml

This commit is contained in:
atlimit8
2014-07-31 18:20:52 -05:00
parent 4b7537bb13
commit 9b30c21f93
9 changed files with 95 additions and 36 deletions

View File

@@ -78,16 +78,8 @@ namespace OpenRA
public readonly TileShape TileShape;
[FieldLoader.Ignore]
public readonly WVec[] SubCellOffsets =
{
new WVec(0, 0, 0),
new WVec(-299, -256, 0),
new WVec(256, -256, 0),
new WVec(0, 0, 0),
new WVec(-299, 256, 0),
new WVec(256, 256, 0),
};
public readonly int SubCellsDefaultIndex = 3;
public readonly WVec[] SubCellOffsets;
public readonly int SubCellDefaultIndex;
[FieldLoader.LoadUsing("LoadOptions")]
public MapOptions Options;
@@ -257,6 +249,8 @@ namespace OpenRA
MapTiles = Exts.Lazy(() => LoadMapTiles());
MapResources = Exts.Lazy(() => LoadResourceTiles());
TileShape = Game.modData.Manifest.TileShape;
SubCellOffsets = Game.modData.Manifest.SubCellOffsets;
SubCellDefaultIndex = Game.modData.Manifest.SubCellDefaultIndex;
// The Uid is calculated from the data on-disk, so
// format changes must be flushed to disk.