Fix editor

This commit is contained in:
Paul Chote
2010-10-16 12:06:29 +13:00
parent b64dcbf502
commit fc07f90f91
3 changed files with 3 additions and 3 deletions

View File

@@ -240,7 +240,6 @@ namespace OpenRA.Editor
else
{
surface1.Map.PlayerCount = surface1.Map.Waypoints.Count;
surface1.Map.Package = new Folder(loadedMapName);
surface1.Map.Save(loadedMapName);
dirty = false;
}
@@ -364,7 +363,6 @@ namespace OpenRA.Editor
Directory.CreateDirectory(savePath);
var map = LegacyMapImporter.Import(ofd.FileName);
map.Package = new Folder(savePath);
map.Players.Add("Neutral", new PlayerReference("Neutral",
Rules.Info["world"].Traits.WithInterface<CountryInfo>().First().Race, true, true));

View File

@@ -17,7 +17,7 @@ namespace OpenRA.FileFormats
{
public class MapStub
{
public readonly IFolder Package;
public IFolder Package { get; protected set; }
// Yaml map data
public string Uid { get; protected set; }

View File

@@ -183,6 +183,8 @@ namespace OpenRA
public void Save(string filepath)
{
// Todo: save to a zip file in the support dir by default
Package = new Folder(filepath);
MapFormat = 3;
var root = new List<MiniYamlNode>();