Example #1
0
        public static void TestImportText()
        {
            var path = Path.Combine(Main.SavePath, "TestImportText/");

            var mod = ModLoader.GetMod("Bluemagic");

            ImportTool.ImportItemTexts(mod, path);
            ImportTool.ImportNPCTexts(mod, path);
            ImportTool.ImportBuffTexts(mod, path);
            ImportTool.ImportMiscTexts(mod, path);
        }
            private void OnComplete()
            {
                Logger.DebugLog(string.Format("{0} downloaded.", SavePath));

                lock (Localizer.downloadMgr.Downloadings)
                {
                    Localizer.downloadMgr.DestroyItem(this);
                }

                var textDir = new FileInfo(SavePath).Directory;

                if (ImportTool.CheckDir(textDir.FullName))
                {
                    Localizer.ApplyTextFile(textDir);
                }
            }
Example #3
0
 public static void ApplyTextFile(DirectoryInfo textDir)
 {
     try
     {
         Logger.DebugLog(string.Format("Apply {0}", textDir.Name));
         var mod = ModLoader.GetMod(textDir.Name);
         if (mod != null)
         {
             ImportTool.ImportModTexts(mod, textDir.FullName);
         }
     }
     catch (Exception ex)
     {
         Logger.Log(ex);
     }
 }