Skeleton for a map converter

This commit is contained in:
Paul Chote
2010-03-30 20:18:07 +13:00
committed by Bob
parent d469fdad94
commit 00288e19a4
10 changed files with 390 additions and 36 deletions

27
MapConverter/Main.cs Normal file
View File

@@ -0,0 +1,27 @@
using System;
using OpenRA.FileFormats;
namespace MapConverter
{
class MainClass
{
public static void Main (string[] args)
{
if (args.Length != 3)
{
Console.WriteLine("usage: MapConverter mod[,mod]* input-map.ini output-map.yaml");
return;
}
var mods = args[0].Split(',');
var manifest = new Manifest(mods);
foreach (var folder in manifest.Folders) FileSystem.Mount(folder);
foreach (var pkg in manifest.Packages) FileSystem.Mount(pkg);
var map = new IniMap(args[1]);
map.Save(args[2]);
}
}
}