Ejemplo n.º 1
0
        public static void LoadListInfoAllPostHook(ChaListControl __instance)
        {
            string listPath = Path.Combine(ResourceRedirector.EmulatedDir, @"list\characustom");

            if (Directory.Exists(listPath))
            {
                foreach (string csvPath in Directory.GetFiles(listPath, "*.csv", SearchOption.AllDirectories))
                {
                    ListLoader.LoadCSV(File.OpenRead(csvPath));
                }
            }

            ListLoader.LoadAllLists(__instance);
        }
Ejemplo n.º 2
0
        public static void LoadListInfoAllPostHook(ChaListControl __instance)
        {
            string listPath = Path.Combine(ResourceRedirector.EmulatedDir, @"list\characustom");

            //BepInLogger.Log($"List directory exists? {Directory.Exists(listPath).ToString()}");

            if (Directory.Exists(listPath))
            {
                foreach (string csvPath in Directory.GetFiles(listPath, "*.csv", SearchOption.AllDirectories))
                {
                    //BepInLogger.Log($"Attempting load of: {csvPath}");

                    var chaListData = ListLoader.LoadCSV(File.OpenRead(csvPath));
                    ListLoader.ExternalDataList.Add(chaListData);

                    //BepInLogger.Log($"Finished load of: {csvPath}");
                }
            }

            ListLoader.LoadAllLists(__instance);
        }