コード例 #1
0
 public static IEnumerable <RecipeDef> ImpliedRecipeDefs()
 {
     foreach (RecipeDef r in RecipeDefGenerator.DefsFromRecipeMakers().Concat(RecipeDefGenerator.DrugAdministerDefs()))
     {
         yield return(r);
     }
 }
コード例 #2
0
        public static void GenerateImpliedDefs_PreResolve()
        {
            IEnumerable <ThingDef> enumerable = ThingDefGenerator_Buildings.ImpliedBlueprintAndFrameDefs().Concat(ThingDefGenerator_Meat.ImpliedMeatDefs()).Concat(ThingDefGenerator_Corpses.ImpliedCorpseDefs())
                                                .Concat(ThingDefGenerator_Leather.ImpliedLeatherDefs());

            foreach (ThingDef item in enumerable)
            {
                item.PostLoad();
                DefDatabase <ThingDef> .Add(item);
            }
            DirectXmlCrossRefLoader.ResolveAllWantedCrossReferences(FailMode.Silent);
            foreach (TerrainDef item2 in TerrainDefGenerator_Stone.ImpliedTerrainDefs())
            {
                item2.PostLoad();
                DefDatabase <TerrainDef> .Add(item2);
            }
            foreach (RecipeDef item3 in RecipeDefGenerator.ImpliedRecipeDefs())
            {
                item3.PostLoad();
                DefDatabase <RecipeDef> .Add(item3);
            }
            foreach (PawnColumnDef item4 in PawnColumnDefgenerator.ImpliedPawnColumnDefs())
            {
                item4.PostLoad();
                DefDatabase <PawnColumnDef> .Add(item4);
            }
        }
コード例 #3
0
 public static void GenerateImpliedDefs_PreResolve()
 {
     foreach (ThingDef item in ThingDefGenerator_Buildings.ImpliedBlueprintAndFrameDefs().Concat(ThingDefGenerator_Meat.ImpliedMeatDefs()).Concat(ThingDefGenerator_Techprints.ImpliedTechprintDefs())
              .Concat(ThingDefGenerator_Corpses.ImpliedCorpseDefs()))
     {
         AddImpliedDef(item);
     }
     DirectXmlCrossRefLoader.ResolveAllWantedCrossReferences(FailMode.Silent);
     foreach (TerrainDef item2 in TerrainDefGenerator_Stone.ImpliedTerrainDefs())
     {
         AddImpliedDef(item2);
     }
     foreach (RecipeDef item3 in RecipeDefGenerator.ImpliedRecipeDefs())
     {
         AddImpliedDef(item3);
     }
     foreach (PawnColumnDef item4 in PawnColumnDefgenerator.ImpliedPawnColumnDefs())
     {
         AddImpliedDef(item4);
     }
     foreach (ThingDef item5 in NeurotrainerDefGenerator.ImpliedThingDefs())
     {
         AddImpliedDef(item5);
     }
 }
コード例 #4
0
            public bool MoveNext()
            {
                uint num = (uint)this.$PC;

                this.$PC = -1;
                bool flag = false;

                switch (num)
                {
                case 0u:
                    enumerator = RecipeDefGenerator.DefsFromRecipeMakers().Concat(RecipeDefGenerator.DrugAdministerDefs()).GetEnumerator();
                    num        = 4294967293u;
                    break;

                case 1u:
                    break;

                default:
                    return(false);
                }
                try
                {
                    switch (num)
                    {
                    }
                    if (enumerator.MoveNext())
                    {
                        r             = enumerator.Current;
                        this.$current = r;
                        if (!this.$disposing)
                        {
                            this.$PC = 1;
                        }
                        flag = true;
                        return(true);
                    }
                }
                finally
                {
                    if (!flag)
                    {
                        if (enumerator != null)
                        {
                            enumerator.Dispose();
                        }
                    }
                }
                this.$PC = -1;
                return(false);
            }
コード例 #5
0
        public static IEnumerable <RecipeDef> ImpliedRecipeDefs()
        {
            using (IEnumerator <RecipeDef> enumerator = RecipeDefGenerator.DefsFromRecipeMakers().Concat(RecipeDefGenerator.DrugAdministerDefs()).GetEnumerator())
            {
                if (enumerator.MoveNext())
                {
                    RecipeDef r = enumerator.Current;
                    yield return(r);

                    /*Error: Unable to find new state assignment for yield return*/;
                }
            }
            yield break;
IL_00bd:
            /*Error near IL_00be: Unexpected return in MoveNext()*/;
        }
コード例 #6
0
        public static void GenerateImpliedDefs_PreResolve()
        {
            IEnumerable <ThingDef> enumerable = ThingDefGenerator_Buildings.ImpliedBlueprintAndFrameDefs().Concat(ThingDefGenerator_Meat.ImpliedMeatDefs()).Concat(ThingDefGenerator_Corpses.ImpliedCorpseDefs());

            foreach (ThingDef current in enumerable)
            {
                DefGenerator.AddImpliedDef <ThingDef>(current);
            }
            DirectXmlCrossRefLoader.ResolveAllWantedCrossReferences(FailMode.Silent);
            foreach (TerrainDef current2 in TerrainDefGenerator_Stone.ImpliedTerrainDefs())
            {
                DefGenerator.AddImpliedDef <TerrainDef>(current2);
            }
            foreach (RecipeDef current3 in RecipeDefGenerator.ImpliedRecipeDefs())
            {
                DefGenerator.AddImpliedDef <RecipeDef>(current3);
            }
            foreach (PawnColumnDef current4 in PawnColumnDefgenerator.ImpliedPawnColumnDefs())
            {
                DefGenerator.AddImpliedDef <PawnColumnDef>(current4);
            }
        }