Пример #1
0
        private static void Read(string gameFile, string outputFile)
        {
            Initialize();

            switch (Path.GetExtension(gameFile))
            {
            case ".udlg":
            {
                Dictionary <string, string> texts = Dialogs.GetSubtitles(gameFile);

                WriteTexts(texts, outputFile);
                break;
            }

            case ".k":
            {
                Dictionary <string, string> texts = Knowledge.GetSubtitles(gameFile);

                WriteTexts(texts, outputFile);
                break;
            }

            case ".item":
            {
                Dictionary <string, string> texts = Items.GetSubtitles(gameFile);

                WriteTexts(texts, outputFile);
                break;
            }

            case ".uz":
            {
                Dictionary <string, string> texts = Zone.GetSubtitles(gameFile);

                WriteTexts(texts, outputFile);
                break;
            }

            case ".uzl":
            {
                Dictionary <string, string> texts = ZoneLayer.GetSubtitles(gameFile);

                WriteTexts(texts, outputFile);
                break;
            }
            }
        }
Пример #2
0
        private static void Write(string gameFile, string textsFile, string outputFile)
        {
            Initialize();

            switch (Path.GetExtension(gameFile))
            {
            case ".udlg":
            {
                Dictionary <string, string> texts = ReadTexts(textsFile);
                aqq model = Dialogs.SetSubtitles(gameFile, texts);
                FileManager.Save(model, outputFile, false);
                break;
            }

            case ".k":
            {
                Dictionary <string, string> texts = ReadTexts(textsFile);
                aj8 model = Knowledge.SetSubtitles(gameFile, texts);
                FileManager.Save(model, outputFile, true);
                break;
            }

            case ".item":
            {
                Dictionary <string, string> texts = ReadTexts(textsFile);
                bqj model = Items.SetSubtitles(gameFile, texts);
                FileManager.Save(model, outputFile, true);
                break;
            }

            case ".uz":
            {
                Dictionary <string, string> texts = ReadTexts(textsFile);
                cfs model = Zone.SetSubtitles(gameFile, texts);
                FileManager.Save(model, outputFile, true);
                break;
            }

            case ".uzl":
            {
                Dictionary <string, string> texts = ReadTexts(textsFile);
                cy3 model = ZoneLayer.SetSubtitles(gameFile, texts);
                FileManager.Save(model, outputFile, true);
                break;
            }
            }
        }