Esempio n. 1
0
        // Adds file hashes to old inventories that don't have them
        static void AddMissingHashes(MergeInventory inventory)
        {
            var anyMissing = false;

            foreach (var merge in inventory.Merges)
            {
                foreach (var mod in merge.Mods)
                {
                    if (mod.Hash == null)
                    {
                        anyMissing = true;
                        mod.Hash   = Tools.Hasher.ComputeHash(merge.GetModFile(mod.Name));
                    }
                }
            }

            if (anyMissing)
            {
                inventory.Save();
            }
        }
        // Adds file hashes to old inventories that don't have them
        static void AddMissingHashes(MergeInventory inventory)
        {
            var anyMissing = false;

            foreach (var merge in inventory.Merges)
            {
                foreach (var mod in merge.Mods)
                {
                    if (mod.Hash == null)
                    {
                        anyMissing = true;
                        mod.Hash = Tools.Hasher.ComputeHash(merge.GetModFile(mod.Name));
                    }
                }
            }

            if (anyMissing)
                inventory.Save();
        }