コード例 #1
0
        public async Task Setup()
        {
            // Load Settings
            System.Console.WriteLine("Running in directory: " + Directory.GetCurrentDirectory());
            FilePath settingsPath = "../../../../TestingSettings.xml";

            System.Console.WriteLine("Settings path: " + settingsPath);
            Settings = JsonConvert.DeserializeObject <TestingSettings>(File.ReadAllText(settingsPath.Path));
            System.Console.WriteLine("Target settings: " + Settings.ToString());

            var passthroughSettings = new PassthroughTestParams()
            {
                NicknameSuffix      = null,
                PassthroughSettings = Settings.PassthroughSettings,
                GameRelease         = GameRelease.Oblivion,
                Target = new Target()
                {
                    Path = $"Oblivion.esm",
                    Do   = true,
                },
            };

            var passthrough = new OblivionPassthroughTest(passthroughSettings);

            (TempFolder TempFolder, Test Test) = passthrough.SetupProcessedFiles();
            using var tmp = TempFolder;
            await Test.Start();

            using (var stream = new BinaryReadStream(passthrough.ProcessedPath(ProcessedFilesFolder)))
            {
                stream.Position = 0xCF614B;
                PathGridBytes   = stream.ReadBytes(0x14C7);
            }
            PathGridReader = new MutagenMemoryReadStream(PathGridBytes, new ParsingBundle(GameRelease.Oblivion, masterReferences: null));
        }
コード例 #2
0
        public async Task Setup()
        {
            // Load Settings
            System.Console.WriteLine("Running in directory: " + Directory.GetCurrentDirectory());
            FilePath settingsPath = "../../../../TestingSettings.xml";

            System.Console.WriteLine("Settings path: " + settingsPath);
            Settings = JsonConvert.DeserializeObject <TestingSettings>(File.ReadAllText(settingsPath.Path));
            System.Console.WriteLine("Target settings: " + Settings.ToString());

            // Setup folders and paths
            ModKey           = new ModKey("Oblivion", ModType.Master);
            TempFolder       = new TempFolder(deleteAfter: true);
            DataPath         = Path.Combine(Settings.DataFolderLocations.Oblivion, "Oblivion.esm");
            BinaryPath       = Path.Combine(TempFolder.Dir.Path, "Oblivion.esm");
            OneTimeXmlFolder = new DirectoryPath(Path.Combine(TempFolder.Dir.Path, "OneTimeFolder"));
            OneTimeXmlFolder.Create();

            // Setup
            Mod = OblivionMod.CreateFromBinary(new ModPath(ModKey, DataPath));
        }
コード例 #3
0
        public async Task Setup()
        {
            // Load Settings
            System.Console.WriteLine("Running in directory: " + Directory.GetCurrentDirectory());
            FilePath settingsPath = "../../../../TestingSettings.xml";

            System.Console.WriteLine("Settings path: " + settingsPath);
            Settings = JsonConvert.DeserializeObject <TestingSettings>(File.ReadAllText(settingsPath.Path));
            System.Console.WriteLine("Target settings: " + Settings.ToString());

            // Setup folders and paths
            DataPath = new ModPath(
                new ModKey("Oblivion", ModType.Master),
                Path.Combine(Settings.DataFolderLocations.Oblivion, "Oblivion.esm"));
            TempFolder = TempFolder.Factory(deleteAfter: true);
            BinaryPath = Path.Combine(TempFolder.Dir.Path, "Oblivion.esm");

            // Setup
            Mod = OblivionMod.CreateFromBinary(DataPath);

            DataOutput = new MemoryStream(new byte[new FileInfo(DataPath.Path).Length]);
        }