Celeste.Mod.mm/Mod/Helpers/ModUpdaterHelper.cs
/// <summary>
/// List all mods needing an update, by comparing the installed mods' hashes with the ones in the update checker database.
/// </summary>
/// <param name="updateCatalog">The update checker database (must not be null!)</param>
/// <returns>A map listing all the updates: info from the update checker database => info from the installed mod</returns>
List all mods needing an update, by comparing the installed mods' hashes with the ones in the update checker database.
List all mods needing an update by comparing the installed mods ' hashes with the ones in the update checker database .
public static SortedDictionary<ModUpdateInfo, EverestModuleMetadata> ListAvailableUpdates(Dictionary<string, ModUpdateInfo> updateCatalog) {
            SortedDictionary<ModUpdateInfo, EverestModuleMetadata> availableUpdatesCatalog = new SortedDictionary<ModUpdateInfo, EverestModuleMetadata>(new MostRecentUpdatedFirst());
            Logger.Log("ModUpdaterHelper", "Checking for updates");
            foreach (EverestModule module in Everest.Modules) {
                EverestModuleMetadata metadata = module.Metadata;
                if (metadata.PathArchive != null && updateCatalog.ContainsKey(metadata.Name)) {
                    string xxHashStringInstalled = BitConverter.ToString(metadata.Hash).Replace("-", "").ToLowerInvariant();
                    Logger.Log("ModUpdaterHelper", $"Mod {metadata.Name}: installed hash {xxHashStringInstalled}, latest hash(es) {string.Join(", ", updateCatalog[metadata.Name].xxHash)}");
                    if (!updateCatalog[metadata.Name].xxHash.Contains(xxHashStringInstalled)) {
                        availableUpdatesCatalog.Add(updateCatalog[metadata.Name], metadata);
                    }
                }
            }
            Logger.Log("ModUpdaterHelper", $"{availableUpdatesCatalog.Count} update(s) available");
            return availableUpdatesCatalog;
        }
public static SortedDictionary < ModUpdateInfo , EverestModuleMetadata > ListAvailableUpdates ( Dictionary < string , ModUpdateInfo > updateCatalog ) { SortedDictionary < ModUpdateInfo , EverestModuleMetadata > availableUpdatesCatalog = new SortedDictionary < ModUpdateInfo , EverestModuleMetadata > ( new MostRecentUpdatedFirst ( ) ) ; Logger . Log ( " " , " " ) ; foreach ( EverestModule module in Everest . Modules ) { EverestModuleMetadata metadata = module . Metadata ; if ( metadata . PathArchive != null && updateCatalog . ContainsKey ( metadata . Name ) ) { string xxHashStringInstalled = BitConverter . ToString ( metadata . Hash ) . Replace ( " " , " " ) . ToLowerInvariant ( ) ; Logger . Log ( " " , $" Mod  { metadata . Name } : installed hash  { xxHashStringInstalled } , latest hash(es)  { string . Join ( " " , updateCatalog [ metadata . Name ] . xxHash ) } " ) ; if ( ! updateCatalog [ metadata . Name ] . xxHash . Contains ( xxHashStringInstalled ) ) { availableUpdatesCatalog . Add ( updateCatalog [ metadata . Name ] , metadata ) ; } } } Logger . Log ( " " , $" { availableUpdatesCatalog . Count }  update(s) available " ) ; return availableUpdatesCatalog ; }
List all mods needing an update, by comparing the installed mods' hashes with the ones in the update checker database.
List all mods needing an update by comparing the installed mods ' hashes with the ones in the update checker database .
A map listing all the updates: info from the update checker database => info from the installed mod
A map listing all the updates : info from the update checker database = > info from the installed mod
updateCatalog
Dictionary<string, ModUpdateInfo>
The update checker database (must not be null!)
The update checker database ( must not be null! )