コード例 #1
0
        public static Map Import(string filename, string mod, Ruleset rules, Action <string> errorHandler)
        {
            var map = new LegacyMapImporter(filename, rules, errorHandler).map;

            map.RequiresMod = mod;
            map.FixOpenAreas(rules);
            return(map);
        }
コード例 #2
0
        public void Run(ModData modData, string[] args)
        {
            // HACK: The engine code assumes that Game.modData is set.
            Game.modData = modData;

            var rules = Game.modData.RulesetCache.LoadDefaultRules();
            var map   = LegacyMapImporter.Import(args[1], modData.Manifest.Mod.Id, rules, e => Console.WriteLine(e));
            var dest  = map.Title + ".oramap";

            map.Save(dest);
            Console.WriteLine(dest + " saved.");
        }
コード例 #3
0
        public void Run(ModData modData, string[] args)
        {
            // HACK: The engine code assumes that Game.modData is set.
            Game.ModData = modData;

            var rules = Game.ModData.RulesetCache.Load();
            var map   = LegacyMapImporter.Import(args[1], modData.Manifest.Mod.Id, rules, Console.WriteLine);

            var fileName = Path.GetFileNameWithoutExtension(args[1]);
            var dest     = fileName + ".oramap";

            map.Save(dest);
            Console.WriteLine(dest + " saved.");
        }
コード例 #4
0
ファイル: LegacyMapImporter.cs プロジェクト: Roger-luo/OpenRA
		public static Map Import(string filename, string mod, Ruleset rules, Action<string> errorHandler)
		{
			var map = new LegacyMapImporter(filename, rules, errorHandler).map;
			map.RequiresMod = mod;
			map.FixOpenAreas(rules);
			return map;
		}