コード例 #1
0
        internal static void ProcessType([NotNull] Type type)
        {
            if (!(Activator.CreateInstance(type) is ICompatibilityProvider provider))
            {
                return;
            }

            bool dependencyLoaded = provider.ModId.StartsWith("Ludeon")
                ? ModLister.GetExpansionWithIdentifier(provider.ModId)?.Status == ExpansionStatus.Active
                : ModLister.GetActiveModWithIdentifier(provider.ModId) != null;

            if (!dependencyLoaded)
            {
                return;
            }

            RegisterAndCatalogue((ICompatibilityProvider)Activator.CreateInstance(type));
        }