Exemplo n.º 1
0
        static void Main(string[] args)
        {
            //Read config
            config = JsonConvert.DeserializeObject <ExtractorConfig>(File.ReadAllText("config.json"));

            //Generate a revision tag and make it's folder structure
            log = new FileStream(config.GetProfile().log_path, FileMode.Create);

            //Do some logging
            Log.WriteHeader("Data created " + DateTime.Now.ToShortDateString() + " " + DateTime.Now.ToLongTimeString() + " LOCAL");
            Log.WriteHeader("Deploying to " + config.enviornment);
            Log.WriteHeader("(C) RomanPort 2019");

            //Init the install
            ArkInstall install = ArkInstall.GetInstall(config.install_path);

            //Create a patch and run
            DeltaExportPatch patch = new DeltaExportPatch(install);

            patch.Go();

            //Finish
            log.Flush();
            log.Close();
            Console.ReadLine();
        }
Exemplo n.º 2
0
        public static List <ArkAsset>[] DiscoverFiles(ArkInstall install, DeltaExportPackage package)
        {
            //Create exclude regexes
            Regex[] excludes = new Regex[Program.config.exclude_regex.Length];
            for (var i = 0; i < excludes.Length; i += 1)
            {
                excludes[i] = new Regex(Program.config.exclude_regex[i]);
            }

            //Create output
            List <ArkAsset>[] assets = new List <ArkAsset> [3];
            for (int i = 0; i < assets.Length; i++)
            {
                assets[i] = new List <ArkAsset>();
            }

            //Loop through dirs
            var dirs = install.GetChildren();

            foreach (var d in dirs)
            {
                DiscoverNamespace(d, excludes, assets, package);
            }

            //Write done
            Log.WriteSuccess("Discovery", $"Seek finished. Found {assets[0].Count} dinos, {assets[1].Count} structures, {assets[2].Count} items");
            return(assets);
        }