예제 #1
0
        public static GameStructure Load(IEnumerable <string> pathes)
        {
            List <string> toProcess = new List <string>();

            toProcess.AddRange(pathes);
            if (toProcess.Count == 0)
            {
                throw new ArgumentException("No pathes found", nameof(pathes));
            }

            GameStructure structure = new GameStructure();

            structure.Load(toProcess);
            return(structure);
        }
예제 #2
0
        public void Load(IReadOnlyList <string> args)
        {
#if !DEBUG_PROGRAM
            try
#endif
            {
                GameStructure.Load(args);
                Validate();

                string exportPath = Path.Combine("Ripped", GameStructure.Name);
                PrepareExportDirectory(exportPath);

                GameStructure.Export(exportPath, AssetSelector);
                Logger.Instance.Log(LogType.Info, LogCategory.General, "Finished");
            }
#if !DEBUG_PROGRAM
            catch (Exception ex)
            {
                Logger.Instance.Log(LogType.Error, LogCategory.General, ex.ToString());
            }
#endif
        }