Example #1
0
        protected virtual IEnumerable<IContentSpec<Content>> HandleLocal(List<IContentSpec<Content>> list,
            string constraint) {
            if (list == null)
                list = new List<IContentSpec<Content>>();

            if (list.Select(x => x.Content).Contains(this))
                return list;

            var spec = new LocalContentSpec(this, constraint);
            list.Add(spec);

            return list;
        }
Example #2
0
        protected override IEnumerable<IContentSpec<Content>> HandleLocal(List<IContentSpec<Content>> list,
            string constraint) {
            if (list == null)
                list = new List<IContentSpec<Content>>();

            if (list.Select(x => x.Content).Contains(this))
                return list;

            var spec = new LocalContentSpec(this, constraint);
            list.Add(spec);
            // TODO: Dependencies of dependencies
            list.AddRange(Dependencies.Select(d => new LocalContentSpec(new ModLocalContent(d, d.ToLower(), GameId, null))));
            list.RemoveAll(x => x.Content == this);
            list.Add(spec);


            return list;
        }