예제 #1
0
파일: Utility.cs 프로젝트: Noggog/Synthesis
        public static TempFolder SetupDataFolder(TempFolder tempFolder, GameRelease release, string?loadOrderPath = null)
        {
            var dataFolder = new TempFolder(Path.Combine(tempFolder.Dir.Path, "Data"));

            dataFolder.Dir.DeleteEntireFolder();
            dataFolder.Dir.Create();
            loadOrderPath ??= PathToLoadOrderFile;
            string testPath, overridePath;

            switch (release)
            {
            case GameRelease.Oblivion:
                testPath     = OblivionPathToTestFile;
                overridePath = OblivionPathToOverrideFile;
                break;

            case GameRelease.SkyrimLE:
            case GameRelease.SkyrimSE:
                testPath     = LePathToTestFile;
                overridePath = LePathToOverrideFile;
                break;

            default:
                throw new NotImplementedException();
            }
            File.Copy(testPath, Path.Combine(dataFolder.Dir.Path, TestFileName));
            File.Copy(overridePath, Path.Combine(dataFolder.Dir.Path, OverrideFileName));
            var loadOrderListing = PluginListings.ListingsFromPath(loadOrderPath, release, dataFolder.Dir);

            LoadOrder.AlignTimestamps(loadOrderListing.OnlyEnabled().Select(m => m.ModKey), dataFolder.Dir.Path);
            return(dataFolder);
        }
예제 #2
0
파일: Utility.cs 프로젝트: Noggog/Synthesis
 public static IEnumerable <LoadOrderListing> TypicalLoadOrder(GameRelease release, DirectoryPath dir) => PluginListings.ListingsFromPath(PathToLoadOrderFile, release, dir);