Beispiel #1
0
        /// <summary>
        /// Checks if all required mods for the specified <paramref name="mod"/> are properly installed and activated.
        /// </summary>
        /// <param name="mod"></param>
        /// <returns></returns>
        public void UpdatedModDependencyState(ModEntry mod)
        {
            var requiredMods             = GetRequiredMods(mod, true, true);
            var allRequiredModsAvailable = requiredMods.All(m => m.WorkshopID != 0 && m.isActive && !m.State.HasFlag(ModState.NotInstalled) && !m.State.HasFlag(ModState.NotLoaded));

            if (allRequiredModsAvailable)
            {
                mod.RemoveState(ModState.MissingDependencies);
            }
            else
            {
                mod.AddState(ModState.MissingDependencies);
            }
        }