Ejemplo n.º 1
0
        public static void LoadIconsOnly(string grimdawnLocation)
        {
            Logger.Debug("Icon loading requested");
            {
                var arcItemsFile = GrimFolderUtility.FindArcFile(grimdawnLocation, "items.arc");
                if (!string.IsNullOrEmpty(arcItemsFile))
                {
                    Logger.Debug($"Loading vanilla icons from {arcItemsFile}");
                    LoadIcons(arcItemsFile);
                }
                else
                {
                    Logger.Warn("Could not find the vanilla icons, skipping.");
                }
            }

            foreach (string path in GrimFolderUtility.GetGrimExpansionFolders(grimdawnLocation))
            {
                var arcItemsFile = GrimFolderUtility.FindArcFile(path, "items.arc");
                if (!string.IsNullOrEmpty(arcItemsFile))
                {
                    Logger.Debug($"Loading expansion icons from {arcItemsFile}");
                    LoadIcons(arcItemsFile);
                }
                else
                {
                    Logger.Warn("Could not find the expansion, skipping.");
                }
            }
        }
Ejemplo n.º 2
0
        public static void LoadIconsOnly(string grimDawnLocation)
        {
            void LoadIconsOrWarn(string arcfile)
            {
                if (!string.IsNullOrEmpty(arcfile))
                {
                    Logger.Debug($"Loading icons from {arcfile}");
                    LoadIcons(arcfile);
                }
                else
                {
                    Logger.Warn("Could not find the icons, skipping.");
                }
            }

            Logger.Debug("Icon loading requested");
            LoadIconsOrWarn(GrimFolderUtility.FindArcFile(grimDawnLocation, "items.arc"));
            LoadIconsOrWarn(GrimFolderUtility.FindArcFile(grimDawnLocation, "Level Art.arc"));

            foreach (var path in GrimFolderUtility.GetGrimExpansionFolders(grimDawnLocation))
            {
                LoadIconsOrWarn(GrimFolderUtility.FindArcFile(path, "items.arc"));
                LoadIconsOrWarn(GrimFolderUtility.FindArcFile(path, "Level Art.arc"));
            }
        }