public List <CurrencyLogicJson> Execute()
        {
            Assembly assem = this.GetType().Assembly;

            return(files.Select(x => FetchHelper.GetEmbeddedResource("Assets\\currency\\" + x, assem))
                   .SelectMany(x => JsonConvert.DeserializeObject <List <CurrencyLogicJson> >(x, new CurrencyLogicConverter()))
                   .ToList());
        }
Пример #2
0
        public List <ModTypeJson> Execute()
        {
            Assembly assem        = this.GetType().Assembly;
            var      json         = FetchHelper.GetEmbeddedResource("Assets\\ggpk\\mod_types.json", assem);
            var      deserialized = JsonConvert.DeserializeObject <Dictionary <string, ModTypeJson> >(json);

            return(deserialized
                   .Select(x => { x.Value.FullName = x.Key; return x.Value; })
                   .ToList());
        }
Пример #3
0
        public List <CraftingBenchJson> Execute()
        {
            Assembly assem        = this.GetType().Assembly;
            var      json         = FetchHelper.GetEmbeddedResource($"Assets\\ggpk\\crafting_bench_options.json", assem);
            var      deserialized = JsonConvert.DeserializeObject <List <CraftingBenchJson> >(json);

            return(deserialized
                   .Where(x => !MasterBlacklist.Contains(x.Master))
                   .Select(x => { x.FullName = x.ModId; return x; })
                   .ToList());
        }
Пример #4
0
        public List <BaseItemJson> Execute()
        {
            Assembly assem        = this.GetType().Assembly;
            var      json         = FetchHelper.GetEmbeddedResource("Assets\\ggpk\\base_items.json", assem);
            var      deserialized = JsonConvert.DeserializeObject <Dictionary <string, BaseItemJson> >(json);

            return(deserialized
                   .Where(IsReleased)
                   .Where(IsSupportedType)
                   .Select(x => { x.Value.FullName = x.Key; return x; })
                   .Select(x => x.Value)
                   .ToList());
        }
Пример #5
0
        public List <ModsJson> Execute()
        {
            Assembly assem = this.GetType().Assembly;
            var      json  = FetchHelper.GetEmbeddedResource("Assets\\ggpk\\mods.json", assem);
            var      temp  = JsonConvert.DeserializeObject <Dictionary <string, ModsJson> >(json)
                             .Where(x => !GenerationTypeBlacklist.Contains(x.Value.GenerationType))
                             .Where(x => !DomainBlacklist.Contains(x.Value.Domain))
                             .Select(x => { x.Value.FullName = x.Key; return(x); })
                             .Select(x => x.Value)
                             .ToList();

            var temp2 = temp.Select(x => x.AddsTags).SelectMany(x => x).Distinct().ToList();

            return(temp);
        }
Пример #6
0
        public List <ItemClassJson> Execute()
        {
            Assembly assem        = this.GetType().Assembly;
            var      json         = FetchHelper.GetEmbeddedResource("Assets\\ggpk\\item_classes.json", assem);
            var      deserialized = JsonConvert.DeserializeObject <Dictionary <string, Dictionary <string, string> > >(json);

            return(deserialized
                   .Select(x => new ItemClassJson()
            {
                FullName = x.Key,
                InfluenceTags = new Dictionary <Influence, string>()
                {
                    { Influence.Crusader, x.Value[CrusaderTag] },
                    { Influence.Elder, x.Value[ElderTag] },
                    { Influence.Hunter, x.Value[HunterTag] },
                    { Influence.Redeemer, x.Value[RedeemerTag] },
                    { Influence.Shaper, x.Value[ShaperTag] },
                    { Influence.Warlord, x.Value[WarlordTag] }
                }
            }).Where(x => x.InfluenceTags.All(y => y.Value != null))
                   .ToList());
        }