Пример #1
0
        public void ConfirmDependencyConstraints()
        {
            var mod1 = new ModNetworkContent("@test-mod-1", GameGuids.Arma3);
            var mod2 = new ModNetworkContent("@test-mod-2", GameGuids.Arma3);

            mod1.Dependencies.Add(new NetworkContentSpec(mod2, "1.0.0"));

            mod1.GetRelatedContent().First().Constraint.ShouldEqual("1.0.0");
        }
Пример #2
0
        private static Content GetOrCreateContent(Game game, ContentIntSpec x)
        {
            var guid    = x.Id.CreateSteamContentIdGuid();
            var content = game.Contents.Find(guid);

            if (content != null)
            {
                return(content);
            }
            content = ModNetworkContent.FromSteamId(x.Id, game.Id);
            game.Contents.Add(content);
            return(content);
        }
Пример #3
0
        public void ConfirmDependencyConstraintsOverride()
        {
            var mod1 = new ModNetworkContent("@test-mod-1", GameGuids.Arma3);
            var mod2 = new ModNetworkContent("@test-mod-2", GameGuids.Arma3);

            mod1.Dependencies.Add(new NetworkContentSpec(mod2, "1.0.0"));

            var collection = new LocalCollection(GameGuids.Arma3, "Test collection", new[] {
                new ContentSpec(mod1),
                new ContentSpec(mod2, "2.0.0")
            });

            collection.GetRelatedContent().First().Constraint.ShouldEqual("2.0.0");
        }
 public bool IsMatch(ModNetworkContent c)
 => c.Publishers.Any(x => Publishers.Any(p => p.Id == x.PublisherId && p.Type == x.Publisher)) ||
 PackageNames.ContainsIgnoreCase(c.PackageName) ||
 Ids.Contains(c.Id);