made SequenceEditor a bit saner for mods (aftermath)
This commit is contained in:
@@ -12,6 +12,7 @@ namespace SequenceEditor
|
|||||||
{
|
{
|
||||||
static class Program
|
static class Program
|
||||||
{
|
{
|
||||||
|
static string XmlFilename;
|
||||||
public static string UnitName;
|
public static string UnitName;
|
||||||
public static XmlDocument Doc;
|
public static XmlDocument Doc;
|
||||||
public static Dictionary<string, Bitmap[]> Shps = new Dictionary<string, Bitmap[]>();
|
public static Dictionary<string, Bitmap[]> Shps = new Dictionary<string, Bitmap[]>();
|
||||||
@@ -61,7 +62,7 @@ namespace SequenceEditor
|
|||||||
e.AppendChild(seqnode);
|
e.AppendChild(seqnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
Doc.Save("sequences.xml");
|
Doc.Save(XmlFilename);
|
||||||
}
|
}
|
||||||
|
|
||||||
[STAThread]
|
[STAThread]
|
||||||
@@ -80,12 +81,13 @@ namespace SequenceEditor
|
|||||||
throw new InvalidOperationException( "Unable to load MIX files" );
|
throw new InvalidOperationException( "Unable to load MIX files" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
XmlFilename = args.FirstOrDefault( x => x.EndsWith(".xml") ) ?? "sequences.xml";
|
||||||
Doc = new XmlDocument();
|
Doc = new XmlDocument();
|
||||||
Doc.Load("sequences.xml");
|
Doc.Load(XmlFilename);
|
||||||
|
|
||||||
Pal = new Palette(FileSystem.Open("temperat.pal"));
|
Pal = new Palette(FileSystem.Open("temperat.pal"));
|
||||||
|
|
||||||
UnitName = args.FirstOrDefault();
|
UnitName = args.FirstOrDefault( x => !x.EndsWith(".xml") );
|
||||||
if (UnitName == null)
|
if (UnitName == null)
|
||||||
UnitName = GetTextForm.GetString("Unit to edit?", "e1");
|
UnitName = GetTextForm.GetString("Unit to edit?", "e1");
|
||||||
if (UnitName == null)
|
if (UnitName == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user