Move maximum terrain height definition to mod.yaml.

This commit is contained in:
Paul Chote
2015-07-05 17:48:34 +01:00
parent 54c2db3804
commit 19c777a922
9 changed files with 20 additions and 16 deletions

View File

@@ -60,11 +60,12 @@ namespace OpenRA.Mods.Common.Widgets.Logic
width = Math.Max(2, width);
height = Math.Max(2, height);
var maxTerrainHeight = Game.ModData.Manifest.MaximumTerrainHeight;
var tileset = modRules.TileSets[tilesetDropDown.Text];
var map = new Map(tileset, width + 2, height + tileset.MaxGroundHeight + 2);
var map = new Map(tileset, width + 2, height + maxTerrainHeight + 2);
var tl = new MPos(1, 1);
var br = new MPos(width, height + tileset.MaxGroundHeight);
var br = new MPos(width, height + maxTerrainHeight);
map.SetBounds(tl, br);
map.PlayerDefinitions = new MapPlayers(map.Rules, map.SpawnPoints.Value.Length).ToMiniYaml();