//////////////// public static bool IsLoadedModProperlyPresented(string modName) { Mod mod = ModLoader.GetMod(modName); if (mod == null) { LogHelpers.Alert("Invalid mod " + modName); return(false); } IDictionary <string, Services.Tml.BuildPropertiesEditor> modInfos = ModListHelpers.GetLoadedModNamesWithBuildProps(); if (!modInfos.ContainsKey(modName)) { LogHelpers.Alert("Missing mod " + modName); return(false); } var modInfo = new BasicModInfoEntry(mod.DisplayName, modInfos[modName].Author.Split(',').SafeSelect(a => a.Trim()), mod.Version, modInfos[modName].Description, modInfos[modName].Homepage ); return(ModIdentityHelpers.IsProperlyPresented(modInfo)); }
//// private IDictionary <string, ISet <Mod> > GetModsByAuthor() { var mods = new Dictionary <string, ISet <Mod> >(); foreach (var kv in ModListHelpers.GetLoadedModsByBuildInfo()) { Services.Tml.BuildPropertiesEditor editor = kv.Key; Mod mod = kv.Value; foreach (string author in editor.Author.Split(',').Select(a => a.Trim())) { mods.Append2D(author, mod); } } return(mods); }
public static IDictionary <Services.Tml.BuildPropertiesEditor, Mod> GetModsByBuildInfo() { return(ModListHelpers.GetLoadedModsByBuildInfo()); }
public static IDictionary <string, ISet <Mod> > GetModsByAuthor() { return(ModListHelpers.GetLoadedModsByAuthor()); }
private IDictionary <string, Services.Tml.BuildPropertiesEditor> GetBuildPropsByModName() { return(ModListHelpers.GetLoadedModsByBuildInfo() .ToDictionary(kv => kv.Value.Name, kv => kv.Key)); }
public static IEnumerable <Mod> GetAllPlayableModsPreferredOrder() { return(ModListHelpers.GetAllLoadedModsPreferredOrder()); }