コード例 #1
0
        protected override void HandleDependencies(IContentManager modList) {
            string[] mods;
            lock (Items)
                mods = ModItems().Select(x => x.GetSerializationString()).ToArray();

            var dependencies = modList.GetDependencies(mods,
                CustomRepoMods);
            Dependencies = modList.FindOrCreateLocalMods(Game, dependencies, CustomRepoMods)
                .ToArray();
        }
コード例 #2
0
        protected void HandleModsetModsInternal(IContentManager modList, IReadOnlyCollection <Mod> inputMods = null)
        {
            var allowedMods = GetCleanedModList().ToArray();
            var foundMods   = modList.FindOrCreateLocalMods(Game, allowedMods, inputMods)
                              .ToArray();

            ReplaceMods(foundMods);
            lock (Items)
                foreach (var item in GetMods())
                {
                    item.RefreshInfo();
                }
        }
コード例 #3
0
 protected virtual IEnumerable <IMod> ConvertToMods(CollectionVersionModel collectionVersion,
                                                    IContentManager contentList) => contentList.FindOrCreateLocalMods(Game,
                                                                                                                      collectionVersion.Dependencies.Select(x => x.Dependency));
コード例 #4
0
 protected override IEnumerable<IMod> ConvertToMods(CollectionVersionModel collectionVersion,
     IContentManager contentList) {
     return contentList.FindOrCreateLocalMods(Game,
         collectionVersion.Dependencies.Select(x => x.Dependency), CustomRepoMods);
 }