public void SaveDLGToFile()
    {
        string filename = EditorUtility.SaveFilePanel("Save File As...", "", "dialog.dlg", "");

        KModuleEditor.CreateGFFFile(AuroraPrefs.GetModuleOutLocation(), "dialog", dlg, "dlg");
        File.Move(AuroraPrefs.GetModuleOutLocation() + "/dialog.dlg", filename);
    }
Example #2
0
    void SaveGIT()
    {
        string    filename = EditorUtility.SaveFilePanel("Save a new GIT file", "", "", "");
        AuroraGIT git      = GameObject.Find("Area").GetComponent <AreaManager>().CreateGIT();
        string    no_ext   = Path.Combine(Path.GetDirectoryName(filename), Path.GetFileNameWithoutExtension(filename));

        KModuleEditor.CreateGFFFile(no_ext, "", git, "git");
    }
Example #3
0
    void SaveFile()
    {
        ConvertDLG();
        AuroraDLG transitionDLG = CreateTransitionDLG();
        //string transitionNSS = GenerateScript();

        string saveLoc = EditorUtility.SaveFolderPanel("Choose Output Folder", "", "");

        string filename = Path.GetFileNameWithoutExtension(loadLoc);
        string ext      = Path.GetExtension(loadLoc);

        string new_filename = TrimPath(12) + "aivo";

        KModuleEditor.CreateGFFFile(saveLoc + "\\", new_filename, dlg, "dlg");
        KModuleEditor.CreateGFFFile(saveLoc + "\\", filename, transitionDLG, "dlg");
        //File.WriteAllText(saveLoc + "\\" + filename + "_s.nss", transitionNSS);
    }
Example #4
0
    void ConvertDLG(string filepath, string outpath)
    {
        // Takes a DLG file and converts it to PCVO

        // Load the DLG
        loadLoc = filepath;
        using (FileStream stream = new FileStream(loadLoc, FileMode.Open))
        {
            dlg = (AuroraDLG) new GFFLoader(stream).GetObject().Serialize <AuroraDLG>();
        }

        // Make the conversions
        ConvertDLG();
        AuroraDLG transitionDLG = CreateTransitionDLG();

        string new_filename = TrimPath(12) + "aivo";

        // Save the files
        KModuleEditor.CreateGFFFile(Path.GetDirectoryName(outpath) + "/" + new_filename + ".dlg", "", dlg, "");
        KModuleEditor.CreateGFFFile(outpath, "", transitionDLG, "");
    }