コード例 #1
0
        public GameObject CreatePrefab()
        {
            GameObject puft = CloudyPuftConfig.CreatePuft(CloudyPuftConfig.BABY_ID, CloudyPuftConfig.BabyName,
                                                          CloudyPuftConfig.BabyDescription,
                                                          "cloudy_puft_baby_kanim"
                                                          //"baby_puft_kanim"
                                                          , true);

            EntityTemplates.ExtendEntityToBeingABaby(puft, (Tag)CloudyPuftConfig.ID, (string)null);
            return(puft);
        }
コード例 #2
0
ファイル: CloudyPuftConfig.cs プロジェクト: erny0507/ONI_MODS
        public GameObject CreatePrefab()
        {
            ComplexRecipe.RecipeElement[] ingredients = new ComplexRecipe.RecipeElement[4]
            {
                new ComplexRecipe.RecipeElement((Tag)PuftConfig.EGG_ID, 2f),
                new ComplexRecipe.RecipeElement((Tag)PuftAlphaConfig.EGG_ID, 1f),
                new ComplexRecipe.RecipeElement((Tag)PuftOxyliteConfig.EGG_ID, 2f),
                new ComplexRecipe.RecipeElement(SimHashes.Hydrogen.CreateTag(), 10f),
            };
            ComplexRecipe.RecipeElement[] results = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement((Tag)CloudyPuftConfig.EGG_ID, 1f)
            };
            var r = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID(ID, (IList <ComplexRecipe.RecipeElement>)ingredients,
                                                                        (IList <ComplexRecipe.RecipeElement>)results), ingredients, results, 0)
            {
                time        = 80f / 8,
                description = BabyDescription,
                nameDisplay = ComplexRecipe.RecipeNameDisplay.Result
            };

            r.fabricators = new List <Tag>()
            {
                TagManager.Create(SupermaterialRefineryConfig.ID)
            };
            return(EntityTemplates.ExtendEntityToFertileCreature(CloudyPuftConfig.CreatePuft(ID,
                                                                                             Name,
                                                                                             Description,
                                                                                             "cloudy_puft_adult_kanim"
                                                                                             // "puft_kanim"
                                                                                             , false), EGG_ID,
                                                                 EggName,
                                                                 Description,
                                                                 "cloudy_puft_egg_kanim", PuftTuning.EGG_MASS, BABY_ID, 45f, 15f,
                                                                 EggChances, CloudyPuftConfig.EGG_SORT_ORDER, true, false, true, 1f));
        }