static void Main(string[] args)
 {
     if (args.Length == 0 || args.Length > 2)
     {
         Console.WriteLine("Usage: pdmodscript <input script> <output mod file>");
         return;
     }
     try
     {
         BundleMod newMod = new BundleMod();
         NameIndex fileIndex = new NameIndex();
         fileIndex.Load("bundle_db.blb");
         ModScriptParser parser = new ModScriptParser(args[0], ref newMod, fileIndex);
         parser.Parse();
         //Use the @name for output filename
         if (args.Length == 1)
             Save( parser.getModName() , newMod);
         else
             Save(args[1], newMod);
     }
     catch (Exception e)
     {
         Console.Write("[ERROR] {0}\nTrace: {1}", e.Message, e.StackTrace);
         return;
     }
 }
Exemplo n.º 2
0
 static void Main(string[] args)
 {
     if (args.Length == 0 || args.Length > 2)
     {
         Console.WriteLine("Usage: pdmodscript <input script> <output mod file>");
         return;
     }
     try
     {
         BundleMod newMod    = new BundleMod();
         NameIndex fileIndex = new NameIndex();
         fileIndex.Load("bundle_db.blb");
         ModScriptParser parser = new ModScriptParser(args[0], ref newMod, fileIndex);
         parser.Parse();
         //Use the @name for output filename
         if (args.Length == 1)
         {
             Save(parser.getModName(), newMod);
         }
         else
         {
             Save(args[1], newMod);
         }
     }
     catch (Exception e)
     {
         Console.Write("[ERROR] {0}\nTrace: {1}", e.Message, e.StackTrace);
         return;
     }
 }