Exemple #1
0
        public static void ImportLegacyMap(string[] args)
        {
            var mod      = args[1];
            var filename = args[2];

            Game.modData = new ModData(mod);
            var rules = Game.modData.RulesetCache.LoadDefaultRules();
            var map   = LegacyMapImporter.Import(filename, rules, e => Console.WriteLine(e));

            map.RequiresMod = mod;
            map.MakeDefaultPlayers();
            map.FixOpenAreas(rules);
            var dest = map.Title + ".oramap";

            map.Save(dest);
            Console.WriteLine(dest + " saved.");
        }
        public static Map Import(string filename, Ruleset rules, Action <string> errorHandler)
        {
            var converter = new LegacyMapImporter(filename, rules, errorHandler);

            return(converter.map);
        }
Exemple #3
0
 public static Map Import(string filename, Ruleset rules, Action<string> errorHandler)
 {
     var converter = new LegacyMapImporter(filename, rules, errorHandler);
     return converter.map;
 }