Reorganize actor and smudge loading.

The actor and smudge definitions are now stored
as raw MiniYamlNodes in the map.  It is now the
responsibility of the consumers to parse these
into real objects.
This commit is contained in:
Paul Chote
2015-04-03 19:23:41 +01:00
parent ea679d4557
commit 4b1f541f34
14 changed files with 104 additions and 132 deletions

View File

@@ -128,7 +128,7 @@ namespace OpenRA.Editor
// but this breaks the game pretty badly.
if (map.PlayerDefinitions.Count == 0)
{
var players = new MapPlayers(map.Rules, map.GetSpawnPoints().Length);
var players = new MapPlayers(map.Rules, map.SpawnPoints.Value.Length);
map.PlayerDefinitions = players.ToMiniYaml();
}
@@ -415,7 +415,7 @@ namespace OpenRA.Editor
map.ResizeCordon((int)nmd.CordonLeft.Value, (int)nmd.CordonTop.Value,
(int)nmd.CordonRight.Value, (int)nmd.CordonBottom.Value);
var players = new MapPlayers(map.Rules, map.GetSpawnPoints().Length);
var players = new MapPlayers(map.Rules, map.SpawnPoints.Value.Length);
map.PlayerDefinitions = players.ToMiniYaml();
map.FixOpenAreas(Program.Rules);
@@ -506,7 +506,7 @@ namespace OpenRA.Editor
void SetupDefaultPlayers(object sender, EventArgs e)
{
dirty = true;
var players = new MapPlayers(surface1.Map.Rules, surface1.Map.GetSpawnPoints().Length);
var players = new MapPlayers(surface1.Map.Rules, surface1.Map.SpawnPoints.Value.Length);
surface1.Map.PlayerDefinitions = players.ToMiniYaml();
surface1.Chunks.Clear();