Esempio n. 1
0
        ////////////////

        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));
        }