Ejemplo n.º 1
0
        public GameObject CreatePrefab()
        {
            GameObject looseEntity = EntityTemplates.CreateLooseEntity(ID, Name, Description, 1f, true, Assets.GetAnim((HashedString)"floral_antihistamine_kanim"),
                                                                       "object", Grid.SceneLayer.Front, EntityTemplates.CollisionShape.RECTANGLE, 0.8f, 0.4f, true, 0, SimHashes.Creature, (List <Tag>)null);
            MedicineInfo medicine_info = new MedicineInfo(ID.ToLower(), Effect_, MedicineInfo.MedicineType.CureSpecific, (string)null, new string[1]
            {
                "Allergies"
            });

            EntityTemplates.ExtendEntityToMedicine(looseEntity, medicine_info);
            looseEntity.GetComponent <KPrefabID>().AddTag(GameTags.MedicalSupplies, false);
            ComplexRecipe.RecipeElement[] ingredients = new ComplexRecipe.RecipeElement[2]
            {
                new ComplexRecipe.RecipeElement(SimHashes.Copper.CreateTag(), 100f),
                new ComplexRecipe.RecipeElement((Tag)FilamentsConfig.Id, 50f)
            };
            ComplexRecipe.RecipeElement[] results = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement((Tag)ID, 1f)
            };

            FloralAntihistamineConfig.recipe = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("Apothecary", (IList <ComplexRecipe.RecipeElement>)ingredients, (IList <ComplexRecipe.RecipeElement>)results), ingredients, results, 0)
            {
                time        = 200f,
                description = (string)Description,
                nameDisplay = ComplexRecipe.RecipeNameDisplay.Result,
                fabricators = new List <Tag>()
                {
                    (Tag)"Apothecary"
                },
                sortOrder    = 20,
                requiredTech = AdvancedCureConfig.recipe.requiredTech// "MedicineIV"
            };
            return(looseEntity);
        }
Ejemplo n.º 2
0
        private void ConfigureRecipes()
        {
            float inputAmount  = 200.0f;
            float outputAmount = 100.0f;

            ComplexRecipe.RecipeElement[] ingredients1 = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement(
                    ElementLoader.FindElementByHash(SimHashes.Sand).tag,
                    inputAmount)
            };
            ComplexRecipe.RecipeElement[] results1 = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement(
                    ElementLoader.FindElementByHash(SimHashes.Salt).tag,
                    outputAmount)
            };
            string str1 = ComplexRecipeManager.MakeRecipeID(Id,
                                                            ingredients1, results1);
            string desc1 = $"Polishes sand into salt.";

            new ComplexRecipe(str1, ingredients1, results1)
            {
                time        = BUILDINGS.FABRICATION_TIME_SECONDS.SHORT,
                nameDisplay = ComplexRecipe.RecipeNameDisplay.Result,
                description = desc1
            }.fabricators = new List <Tag>()
            {
                TagManager.Create(Id)
            };
        }
Ejemplo n.º 3
0
        public static void RemoveInsulator()
        {
            float num3 = 0.15f;
            float num4 = 0.05f;
            float num5 = 1f - num4 - num3;

            ComplexRecipe.RecipeElement[] ingredients2 = new ComplexRecipe.RecipeElement[3]
            {
                new ComplexRecipe.RecipeElement(SimHashes.Isoresin.CreateTag(), 100f * num3),
                new ComplexRecipe.RecipeElement(SimHashes.Katairite.CreateTag(), 100f * num5),
                new ComplexRecipe.RecipeElement(BasicFabricConfig.ID.ToTag(), 100f * num4)
            };
            ComplexRecipe.RecipeElement[] results2 = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement(SimHashes.SuperInsulator.CreateTag(), 100f)
            };

            string        recipeId = ComplexRecipeManager.MakeRecipeID(Id, ingredients2, results2);
            ComplexRecipe recipe   = ComplexRecipeManager.Get().GetRecipe(recipeId);

            if (recipe != null)
            {
                ComplexRecipeManager.Get().recipes.Remove(recipe);
            }
            else
            {
                Debug.Log(nameof(ComplexRecipeManager) + " failed to add the new recipe.");
            }
        }
Ejemplo n.º 4
0
    public static void Postfix()
    {
        ComplexRecipe.RecipeElement[] ingredients = new ComplexRecipe.RecipeElement[3]
        {
            new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Steel).tag, 25f),
            new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Glass).tag, 25f),
            new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.SolidNaphtha).tag, 100f)
        };
        ComplexRecipe.RecipeElement[] results = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.LiquidPropane).tag, 100f)
        };
        string obsolete_id = ComplexRecipeManager.MakeObsoleteRecipeID("GlassForge", ingredients[0].material);
        string str         = ComplexRecipeManager.MakeRecipeID("GlassForge", (IList <ComplexRecipe.RecipeElement>)ingredients, (IList <ComplexRecipe.RecipeElement>)results);

        new ComplexRecipe(str, ingredients, results)
        {
            time = 40f,
            useResultAsDescription = true,
            description            = string.Format((string)STRINGS.BUILDINGS.PREFABS.GLASSFORGE.RECIPE_DESCRIPTION, (object)ElementLoader.GetElement(results[0].material).name, (object)ElementLoader.GetElement(ingredients[0].material).name)
        }.fabricators = new List <Tag>()
        {
            TagManager.Create("GlassForge")
        };
        ComplexRecipeManager.Get().AddObsoleteIDMapping(obsolete_id, str);
    }
Ejemplo n.º 5
0
        private static void Postfix(Game __instance, GameObject go)
        {
            if (CustomizeBuildingsState.StateManager.State.NewRecipeRockCrusher)
            {
                string workstation = "RockCrusher"; // "Kiln"

                Tag   ingredient1 = SimHashes.Regolith.CreateTag();
                float amountIn1   = 100f;
                Tag   result1     = SimHashes.Sand.CreateTag();
                float amountOut1  = 99f;

                ComplexRecipe.RecipeElement[] ingredients1 = new ComplexRecipe.RecipeElement[] { new ComplexRecipe.RecipeElement(ingredient1, amountIn1) };
                ComplexRecipe.RecipeElement[] results1     = new ComplexRecipe.RecipeElement[] { new ComplexRecipe.RecipeElement(result1, amountOut1) };

                string        obsolete_id1   = ComplexRecipeManager.MakeObsoleteRecipeID(workstation, result1);
                string        str1           = ComplexRecipeManager.MakeRecipeID(workstation, (IList <ComplexRecipe.RecipeElement>)ingredients1, (IList <ComplexRecipe.RecipeElement>)results1);
                ComplexRecipe complexRecipe1 = new ComplexRecipe(str1, ingredients1, results1)
                {
                    time        = 40f,
                    description = "Turns Regolith into Sand and Dirt.",
                    fabricators = new List <Tag>()
                    {
                        TagManager.Create(workstation)
                    },
                    nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult
                };
                ComplexRecipeManager.Get().AddObsoleteIDMapping(obsolete_id1, str1);
            }
        }
Ejemplo n.º 6
0
        public GameObject CreatePrefab()
        {
            ComplexRecipe.RecipeElement[] ingredients = new ComplexRecipe.RecipeElement[4]
            {
                new ComplexRecipe.RecipeElement((Tag)PuftConfig.EGG_ID, 2f),
                new ComplexRecipe.RecipeElement((Tag)PuftBleachstoneConfig.EGG_ID, 1f),
                new ComplexRecipe.RecipeElement((Tag)PuftOxyliteConfig.EGG_ID, 1f),
                new ComplexRecipe.RecipeElement(SimHashes.SourGas.CreateTag(), 10f),
            };
            ComplexRecipe.RecipeElement[] results = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement((Tag)DevilPuftConfig.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(DevilPuftConfig.CreatePuft(ID,
                                                                                            Name,
                                                                                            Description,
                                                                                            "devil_puft_adult_kanim", false), EGG_ID,
                                                                 EggName,
                                                                 Description,
                                                                 "devil_puft_egg_kanim", PuftTuning.EGG_MASS, BABY_ID, 45f, 15f,
                                                                 EggChances, DevilPuftConfig.EGG_SORT_ORDER, true, false, true, 1f));
        }
Ejemplo n.º 7
0
        public void burnCloth()
        {
            Dictionary <string, string> vests = new Dictionary <string, string>
            {
                { "Cool_Vest", EQUIPMENT.PREFABS.COOL_VEST.NAME },
                { "Funky_Vest", EQUIPMENT.PREFABS.FUNKY_VEST.NAME },
                { "Warm_Vest", EQUIPMENT.PREFABS.WARM_VEST.NAME }
            };

            Tag    coal     = SimHashes.Carbon.CreateTag();
            string descBurn = "Burn old {0}";

            foreach (KeyValuePair <string, string> vest in vests)
            {
                ComplexRecipe.RecipeElement[] input = new ComplexRecipe.RecipeElement[]
                { new ComplexRecipe.RecipeElement(vest.Key, 1) };

                ComplexRecipe.RecipeElement[] output = new ComplexRecipe.RecipeElement[]
                { new ComplexRecipe.RecipeElement(coal, 3) };

                ComplexRecipe recipe = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("Kiln", input, output), input, output);
                recipe.time        = 55f;
                recipe.description = string.Format(descBurn, vest.Value);
                recipe.fabricators = new List <Tag> {
                    TagManager.Create("Kiln")
                };
                recipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;

                recipesIDs.Add(recipe.id);
            }
        }
Ejemplo n.º 8
0
        public void limeCrushing()
        {
            Dictionary <string[], float[]> organics = new Dictionary <string[], float[]>
            {
                { new string[] { "EggShell", MISC.TAGS.EGGSHELL }, new float[] { 5, 5 } },
                { new string[] { "BabyCrabShell", ITEMS.INDUSTRIAL_PRODUCTS.CRAB_SHELL.NAME }, new float[] { 1, 5 } },
                { new string[] { "CrabShell", ITEMS.INDUSTRIAL_PRODUCTS.CRAB_SHELL.NAME }, new float[] { 1, 10 } }
            };

            Tag    lime = SimHashes.Lime.CreateTag();
            string desc = "Crushes {0} into {1}";

            foreach (KeyValuePair <string[], float[]> organic in organics)
            {
                ComplexRecipe.RecipeElement[] input = new ComplexRecipe.RecipeElement[]
                { new ComplexRecipe.RecipeElement(organic.Key[0], organic.Value[0]), };

                ComplexRecipe.RecipeElement[] output = new ComplexRecipe.RecipeElement[]
                { new ComplexRecipe.RecipeElement(lime, organic.Value[1]) };

                ComplexRecipe recipe = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("RockCrusher", input, output), input, output);
                recipe.time        = 40f;
                recipe.description = string.Format(desc, organic.Key[1], lime);
                recipe.fabricators = new List <Tag> {
                    TagManager.Create("RockCrusher")
                };
                recipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;

                recipesIDs.Add(recipe.id);
            }
        }
Ejemplo n.º 9
0
        public void saltCrushing()
        {
            Tag    salt      = SimHashes.Salt.CreateTag();
            Tag    tableSalt = TableSaltConfig.ID.ToTag();
            Tag    sand      = SimHashes.Sand.CreateTag();
            float  num       = 5E-05f;
            string desc      = "Crushes {0} into {1} and some {2}";

            ComplexRecipe.RecipeElement[] input = new ComplexRecipe.RecipeElement[]
            { new ComplexRecipe.RecipeElement(salt, 100) };

            ComplexRecipe.RecipeElement[] output = new ComplexRecipe.RecipeElement[]
            {
                new ComplexRecipe.RecipeElement(tableSalt, 100 * num),
                new ComplexRecipe.RecipeElement(sand, 100 * (1 - num))
            };

            ComplexRecipe recipe = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("RockCrusher", input, output), input, output);

            recipe.time        = 120f;
            recipe.description = string.Format(desc, salt, tableSalt, sand);
            recipe.fabricators = new List <Tag> {
                TagManager.Create("RockCrusher")
            };
            recipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;

            recipesIDs.Add(recipe.id);
        }
Ejemplo n.º 10
0
        public void clayToSlime()
        {
            Tag    clay  = SimHashes.Clay.CreateTag();
            Tag    dirt  = SimHashes.ToxicSand.CreateTag();
            Tag    slime = SimHashes.SlimeMold.CreateTag();
            string desc  = "Mixes {0} with {1} to create {2}";

            ComplexRecipe.RecipeElement[] input = new ComplexRecipe.RecipeElement[]
            {
                new ComplexRecipe.RecipeElement(clay, 200),
                new ComplexRecipe.RecipeElement(dirt, 200)
            };

            ComplexRecipe.RecipeElement[] output = new ComplexRecipe.RecipeElement[]
            { new ComplexRecipe.RecipeElement(slime, 400) };

            ComplexRecipe recipe = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("RockCrusher", input, output), input, output);

            recipe.time        = 100f;
            recipe.description = string.Format(desc, clay, dirt, slime);
            recipe.fabricators = new List <Tag> {
                TagManager.Create("RockCrusher")
            };
            recipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;

            recipesIDs.Add(recipe.id);
        }
Ejemplo n.º 11
0
        public void add_recipe_Dirt()
        {
            ComplexRecipe.RecipeElement[] ingredients = new ComplexRecipe.RecipeElement[4]
            {
                new ComplexRecipe.RecipeElement(SimHashes.Granite.CreateTag(), 1000f),
                new ComplexRecipe.RecipeElement(SimHashes.Water.CreateTag(), 1000f),
                new ComplexRecipe.RecipeElement(SimHashes.DirtyWater.CreateTag(), 1000f),
                new ComplexRecipe.RecipeElement(SimHashes.Obsidian.CreateTag(), 1000f),
            };
            ComplexRecipe.RecipeElement[] results = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement(SimHashes.Dirt.CreateTag(), 4000f)
            };
            var r = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID(ID, (IList <ComplexRecipe.RecipeElement>)ingredients,
                                                                        (IList <ComplexRecipe.RecipeElement>)results), ingredients, results)
            {
                time        = 80f / 8,
                description = "Pulverize minerals until an organic paste is made",
                nameDisplay = ComplexRecipe.RecipeNameDisplay.Result
            };

            r.fabricators = new List <Tag>()
            {
                TagManager.Create(SupermaterialRefineryConfig.ID)
            };
        }
Ejemplo n.º 12
0
        public void fossilCrushing()
        {
            Tag    fossil = SimHashes.Fossil.CreateTag();
            Tag    lime   = SimHashes.Lime.CreateTag();
            Tag    sand   = SimHashes.Sand.CreateTag();
            string desc   = "Crushes {0} into {1} and {2}";

            ComplexRecipe.RecipeElement[] input = new ComplexRecipe.RecipeElement[]
            { new ComplexRecipe.RecipeElement(fossil, 100) };

            ComplexRecipe.RecipeElement[] output = new ComplexRecipe.RecipeElement[]
            {
                new ComplexRecipe.RecipeElement(lime, 5),
                new ComplexRecipe.RecipeElement(sand, 95)
            };

            ComplexRecipe recipe = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("RockCrusher", input, output), input, output);

            recipe.time        = 40f;
            recipe.description = string.Format(desc, fossil, lime, sand);
            recipe.fabricators = new List <Tag> {
                TagManager.Create("RockCrusher")
            };
            recipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult;

            recipesIDs.Add(recipe.id);
        }
Ejemplo n.º 13
0
        public static void Postfix()
        {
            Element pyrite = ElementLoader.FindElementByHash(SimHashes.FoolsGold);

            pyrite.thermalConductivity = ElementLoader.FindElementByHash(SimHashes.Ceramic).thermalConductivity;

            ComplexRecipe.RecipeElement recipeElement3 = new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.IronOre).tag, 50f);
            ComplexRecipe.RecipeElement recipeElement4 = new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Gold).tag, 20f);
            ComplexRecipe.RecipeElement recipeElement6 = new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.FoolsGold).tag, 50f);

            ComplexRecipe.RecipeElement[] ingredients1 = new ComplexRecipe.RecipeElement[2] {
                recipeElement3, recipeElement4
            };
            ComplexRecipe.RecipeElement[] results1 = new ComplexRecipe.RecipeElement[1] {
                recipeElement6
            };
            string str1 = ComplexRecipeManager.MakeRecipeID("MetalRefinery", (IList <ComplexRecipe.RecipeElement>)results1, (IList <ComplexRecipe.RecipeElement>)ingredients1);

            new ComplexRecipe(str1, ingredients1, results1)
            {
                time = 1000f,
                useResultAsDescription = true,
                description            = string.Format((string)STRINGS.BUILDINGS.PREFABS.METALREFINERY.RECIPE_DESCRIPTION, (object)ElementLoader.GetElement(recipeElement3.material).name, (object)ElementLoader.GetElement(recipeElement6.material).name)
            }.fabricators = new List <Tag>()
            {
                TagManager.Create("MetalRefinery")
            };
        }
Ejemplo n.º 14
0
    public GameObject CreatePrefab()
    {
        GameObject gameObject = EntityTemplates.CreateLooseEntity("BasicBooster", ITEMS.PILLS.BASICBOOSTER.NAME, ITEMS.PILLS.BASICBOOSTER.DESC, 1f, true, Assets.GetAnim("pill_2_kanim"), "object", Grid.SceneLayer.Front, EntityTemplates.CollisionShape.RECTANGLE, 0.8f, 0.4f, true, 0, SimHashes.Creature, null);

        EntityTemplates.ExtendEntityToMedicine(gameObject, MEDICINE.BASICBOOSTER);
        ComplexRecipe.RecipeElement[] array = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement("Carbon", 1f)
        };
        ComplexRecipe.RecipeElement[] array2 = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement("BasicBooster".ToTag(), 1f)
        };
        string        id            = ComplexRecipeManager.MakeRecipeID("Apothecary", array, array2);
        ComplexRecipe complexRecipe = new ComplexRecipe(id, array, array2);

        complexRecipe.time        = 50f;
        complexRecipe.description = ITEMS.PILLS.BASICBOOSTER.RECIPEDESC;
        complexRecipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.Result;
        complexRecipe.fabricators = new List <Tag>
        {
            "Apothecary"
        };
        complexRecipe.sortOrder = 1;
        recipe = complexRecipe;
        return(gameObject);
    }
Ejemplo n.º 15
0
    public GameObject CreatePrefab()
    {
        GameObject gameObject = EntityTemplates.CreateLooseEntity("IntermediateCure", ITEMS.PILLS.INTERMEDIATECURE.NAME, ITEMS.PILLS.INTERMEDIATECURE.DESC, 1f, true, Assets.GetAnim("iv_slimelung_kanim"), "object", Grid.SceneLayer.Front, EntityTemplates.CollisionShape.RECTANGLE, 0.8f, 0.4f, true, 0, SimHashes.Creature, null);
        KPrefabID  component  = gameObject.GetComponent <KPrefabID>();

        component.AddTag(GameTags.MedicalSupplies, false);
        ComplexRecipe.RecipeElement[] array = new ComplexRecipe.RecipeElement[2]
        {
            new ComplexRecipe.RecipeElement(SwampLilyFlowerConfig.ID, 1f),
            new ComplexRecipe.RecipeElement(SimHashes.Phosphorite.CreateTag(), 1f)
        };
        ComplexRecipe.RecipeElement[] array2 = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement("IntermediateCure", 1f)
        };
        string        id            = ComplexRecipeManager.MakeRecipeID("Apothecary", array, array2);
        ComplexRecipe complexRecipe = new ComplexRecipe(id, array, array2);

        complexRecipe.time        = 100f;
        complexRecipe.description = ITEMS.PILLS.INTERMEDIATECURE.RECIPEDESC;
        complexRecipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.Result;
        complexRecipe.fabricators = new List <Tag>
        {
            "Apothecary"
        };
        complexRecipe.sortOrder    = 10;
        complexRecipe.requiredTech = "MedicineII";
        recipe = complexRecipe;
        return(gameObject);
    }
Ejemplo n.º 16
0
            private static void Postfix()
            {
                var ingredients = new[]
                {
                    new ComplexRecipe.RecipeElement(TagManager.Create("BasicSingleHarvestPlantSeed"), 10f),
                    new ComplexRecipe.RecipeElement(BasicFabricConfig.ID.ToTag(), 10f)
                };

                var result = new[]
                {
                    new ComplexRecipe.RecipeElement(TagManager.Create(PalmeraTreeConfig.SeedId), 1f)
                };

                new ComplexRecipe(ComplexRecipeManager.MakeRecipeID(MolecularForgeId, ingredients, result), ingredients,
                                  result)
                {
                    time                   = 50f,
                    description            = "What will happen if you mash some organic mass together?",
                    useResultAsDescription = true
                }
                .fabricators = new List <Tag>()
                {
                    TagManager.Create(MolecularForgeId)
                };
            }
Ejemplo n.º 17
0
            public static void Postfix()
            {
                var ingredients = new[]
                {
                    new ComplexRecipe.RecipeElement(SimHashes.Diamond.CreateTag(), 50f),
                    new ComplexRecipe.RecipeElement(BasicFabricConfig.ID.ToTag(), 10f)
                };

                var result = new[]
                {
                    new ComplexRecipe.RecipeElement(TagManager.Create(FervineConfig.SeedId), 1f)
                };

                new ComplexRecipe(ComplexRecipeManager.MakeRecipeID(MolecularForgeId, ingredients, result), ingredients,
                                  result)
                {
                    time                   = 50f,
                    description            = "Plant + shiny = ?",
                    useResultAsDescription = true
                }
                .fabricators = new List <Tag>()
                {
                    TagManager.Create(MolecularForgeId)
                };
            }
Ejemplo n.º 18
0
        public GameObject CreatePrefab()
        {
            Db.Get().effects.Add(CreateEffect());

            GameObject gameObject = EntityTemplates.CreateLooseEntity("Stimulant", "Stimulant", "Temporarily increases physical ability at the cost of increased metabolism.", 1f, unitMass: true, Assets.GetAnim("pill_2_kanim"), "object", Grid.SceneLayer.Front, EntityTemplates.CollisionShape.RECTANGLE, 0.8f, 0.4f, isPickupable: true);

            EntityTemplates.ExtendEntityToMedicine(gameObject, medicineInfo);
            ComplexRecipe.RecipeElement[] inputs = new ComplexRecipe.RecipeElement[3]
            {
                new ComplexRecipe.RecipeElement(SimHashes.RefinedCarbon.CreateTag(), 10f),
                new ComplexRecipe.RecipeElement(SpiceNutConfig.ID, 1f),
                new ComplexRecipe.RecipeElement("LightBugEgg", 1f)
            };
            ComplexRecipe.RecipeElement[] outputs = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement("Stimulant", 10f)
            };
            string id = ComplexRecipeManager.MakeRecipeID("Apothecary", inputs, outputs);

            recipe = new ComplexRecipe(id, inputs, outputs)
            {
                time        = 75f,
                description = "Temporarily increases physical ability at the cost of increased metabolism.",
                nameDisplay = ComplexRecipe.RecipeNameDisplay.Result,
                fabricators = new List <Tag> {
                    "Apothecary"
                },
                sortOrder = 1
            };
            return(gameObject);
        }
Ejemplo n.º 19
0
    public static void Postfix()
    {
        ElementLoader.FindElementByHash(SimHashes.SolidMercury).highTemp            = 1000f;
        ElementLoader.FindElementByHash(SimHashes.Mercury).lowTemp                  = 50f;
        ElementLoader.FindElementByHash(SimHashes.Mercury).highTemp                 = 1200f;
        ElementLoader.FindElementByHash(SimHashes.Granite).highTempTransitionTarget = SimHashes.Mercury;
        ComplexRecipe.RecipeElement[] ingredients = new ComplexRecipe.RecipeElement[3]
        {
            new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Tungsten).tag, 50f),
            new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.MaficRock).tag, 50f),
            new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Obsidian).tag, 100f)
        };
        ComplexRecipe.RecipeElement[] results = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Mercury).tag, 200f)
        };
        string obsolete_id = ComplexRecipeManager.MakeObsoleteRecipeID("GlassForge", ingredients[0].material);
        string str         = ComplexRecipeManager.MakeRecipeID("GlassForge", (IList <ComplexRecipe.RecipeElement>)ingredients, (IList <ComplexRecipe.RecipeElement>)results);

        new ComplexRecipe(str, ingredients, results)
        {
            time = 40f,
            useResultAsDescription = true,
            description            = string.Format((string)STRINGS.BUILDINGS.PREFABS.GLASSFORGE.RECIPE_DESCRIPTION, (object)ElementLoader.GetElement(results[0].material).name, (object)ElementLoader.GetElement(ingredients[0].material).name)
        }.fabricators = new List <Tag>()
        {
            TagManager.Create("GlassForge")
        };
        ComplexRecipeManager.Get().AddObsoleteIDMapping(obsolete_id, str);
    }
Ejemplo n.º 20
0
        public GameObject CreatePrefab()
        {
            GameObject looseEntity = EntityTemplates.CreateLooseEntity(ID, Name, Description, 1f, true, Assets.GetAnim((HashedString)"mending_serum_kanim"),
                                                                       "object", Grid.SceneLayer.Front, EntityTemplates.CollisionShape.RECTANGLE, 0.8f, 0.4f, true, 0, SimHashes.Creature, (List <Tag>)null);
            MedicineInfo medicine_info = new MedicineInfo(ID.ToLower(), Effect_, MedicineInfo.MedicineType.Booster, "AdvancedDoctorStation", (string[])null);

            EntityTemplates.ExtendEntityToMedicine(looseEntity, medicine_info);
            looseEntity.GetComponent <KPrefabID>().AddTag(GameTags.MedicalSupplies, false);
            ComplexRecipe.RecipeElement[] ingredients = new ComplexRecipe.RecipeElement[3]
            {
                new ComplexRecipe.RecipeElement((Tag)RawEggConfig.ID, 3f),
                new ComplexRecipe.RecipeElement((Tag)NectarConfig.Id, 10f),
                new ComplexRecipe.RecipeElement((Tag)SwampLilyFlowerConfig.ID, 1f)
            };
            ComplexRecipe.RecipeElement[] results = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement((Tag)ID, 1f)
            };
            MendingSerumConfig.recipe = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("Apothecary", (IList <ComplexRecipe.RecipeElement>)ingredients, (IList <ComplexRecipe.RecipeElement>)results), ingredients, results, 0)
            {
                time        = 200f,
                description = (string)Description,
                nameDisplay = ComplexRecipe.RecipeNameDisplay.Result,
                fabricators = new List <Tag>()
                {
                    (Tag)"Apothecary"
                },
                sortOrder    = 20,
                requiredTech = AdvancedCureConfig.recipe.requiredTech// "MedicineIV"
            };
            return(looseEntity);
        }
Ejemplo n.º 21
0
        public static void Postfix()
        {
            ComplexRecipe.RecipeElement[] ingredients2 = new ComplexRecipe.RecipeElement[4]
            {
                new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Tungsten).tag, 50f),
                new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.MaficRock).tag, 50f),
                new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Obsidian).tag, 100f),
                new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.SuperCoolant).tag, 50f),
            };
            ComplexRecipe.RecipeElement[] results2 = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement(SimHashes.SolidMercury.CreateTag(), 100f)
            };
            ComplexRecipe complexRecipe3 = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("SupermaterialRefinery", (IList <ComplexRecipe.RecipeElement>)ingredients2, (IList <ComplexRecipe.RecipeElement>)results2), ingredients2, results2);

            complexRecipe3.time                   = 80f;
            complexRecipe3.description            = (string)STRINGS.BUILDINGS.PREFABS.SUPERMATERIALREFINERY.SUPERCOOLANT_RECIPE_DESCRIPTION;
            complexRecipe3.useResultAsDescription = true;
            ComplexRecipe complexRecipe4 = complexRecipe3;
            List <Tag>    tagList3       = new List <Tag>();

            tagList3.Add(TagManager.Create("SupermaterialRefinery"));
            List <Tag> tagList4 = tagList3;

            complexRecipe4.fabricators = tagList4;
        }
Ejemplo n.º 22
0
        public static void Postfix()
        {
            ComplexRecipe.RecipeElement[] ingredients2 = new ComplexRecipe.RecipeElement[3]
            {
                new ComplexRecipe.RecipeElement(SimHashes.MaficRock.CreateTag(), 70f),
                new ComplexRecipe.RecipeElement(SimHashes.Sulfur.CreateTag(), 10f),
                new ComplexRecipe.RecipeElement(SimHashes.IgneousRock.CreateTag(), 20f)
            };
            ComplexRecipe.RecipeElement[] results2 = new ComplexRecipe.RecipeElement[2]
            {
                new ComplexRecipe.RecipeElement(SimHashes.Wolframite.CreateTag(), 50f),
                new ComplexRecipe.RecipeElement(SimHashes.Sand.CreateTag(), 50f)
            };
            ComplexRecipe complexRecipe3 = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("SupermaterialRefinery", (IList <ComplexRecipe.RecipeElement>)ingredients2, (IList <ComplexRecipe.RecipeElement>)results2), ingredients2, results2);

            complexRecipe3.time                   = 80f;
            complexRecipe3.description            = (string)STRINGS.BUILDINGS.PREFABS.SUPERMATERIALREFINERY.SUPERCOOLANT_RECIPE_DESCRIPTION;
            complexRecipe3.useResultAsDescription = true;
            ComplexRecipe complexRecipe4 = complexRecipe3;
            List <Tag>    tagList3       = new List <Tag>();

            tagList3.Add(TagManager.Create("SupermaterialRefinery"));
            List <Tag> tagList4 = tagList3;

            complexRecipe4.fabricators = tagList4;
        }
Ejemplo n.º 23
0
        public static void Postfix()
        {
            float num1 = 0.01f;

            ComplexRecipe.RecipeElement[] ingredients2 = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement(SimHashes.Steel.CreateTag(), 100f)
            };
            ComplexRecipe.RecipeElement[] results2 = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement(SimHashes.Lime.CreateTag(), 20f)
            };
            ComplexRecipe complexRecipe3 = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID("SupermaterialRefinery", (IList <ComplexRecipe.RecipeElement>)ingredients2, (IList <ComplexRecipe.RecipeElement>)results2), ingredients2, results2);

            complexRecipe3.time                   = 80f;
            complexRecipe3.description            = (string)STRINGS.BUILDINGS.PREFABS.SUPERMATERIALREFINERY.SUPERCOOLANT_RECIPE_DESCRIPTION;
            complexRecipe3.useResultAsDescription = true;
            ComplexRecipe complexRecipe4 = complexRecipe3;
            List <Tag>    tagList3       = new List <Tag>();

            tagList3.Add(TagManager.Create("SupermaterialRefinery"));
            List <Tag> tagList4 = tagList3;

            complexRecipe4.fabricators = tagList4;
        }
    public GameObject CreatePrefab()
    {
        GameObject gameObject = EntityTemplates.CreateLooseEntity("AdvancedCure", ITEMS.PILLS.ADVANCEDCURE.NAME, ITEMS.PILLS.ADVANCEDCURE.DESC, 1f, true, Assets.GetAnim("vial_spore_kanim"), "object", Grid.SceneLayer.Front, EntityTemplates.CollisionShape.RECTANGLE, 0.8f, 0.4f, true, 0, SimHashes.Creature, null);
        KPrefabID  component  = gameObject.GetComponent <KPrefabID>();

        component.AddTag(GameTags.MedicalSupplies, false);
        ComplexRecipe.RecipeElement[] array = new ComplexRecipe.RecipeElement[2]
        {
            new ComplexRecipe.RecipeElement(SimHashes.Steel.CreateTag(), 1f),
            new ComplexRecipe.RecipeElement("LightBugOrangeEgg", 1f)
        };
        ComplexRecipe.RecipeElement[] array2 = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement("AdvancedCure", 1f)
        };
        string        id            = ComplexRecipeManager.MakeRecipeID("Apothecary", array, array2);
        ComplexRecipe complexRecipe = new ComplexRecipe(id, array, array2);

        complexRecipe.time        = 200f;
        complexRecipe.description = ITEMS.PILLS.ADVANCEDCURE.RECIPEDESC;
        complexRecipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.Result;
        complexRecipe.fabricators = new List <Tag>
        {
            "Apothecary"
        };
        complexRecipe.sortOrder    = 20;
        complexRecipe.requiredTech = "MedicineIV";
        recipe = complexRecipe;
        return(gameObject);
    }
    public GameObject CreatePrefab()
    {
        GameObject gameObject = EntityTemplates.CreateLooseEntity("Antihistamine", ITEMS.PILLS.ANTIHISTAMINE.NAME, ITEMS.PILLS.ANTIHISTAMINE.DESC, 1f, true, Assets.GetAnim("pill_allergies_kanim"), "object", Grid.SceneLayer.Front, EntityTemplates.CollisionShape.RECTANGLE, 0.8f, 0.4f, true, 0, SimHashes.Creature, null);

        EntityTemplates.ExtendEntityToMedicine(gameObject, MEDICINE.ANTIHISTAMINE);
        ComplexRecipe.RecipeElement[] array = new ComplexRecipe.RecipeElement[2]
        {
            new ComplexRecipe.RecipeElement("PrickleFlowerSeed", 1f),
            new ComplexRecipe.RecipeElement(SimHashes.Dirt.CreateTag(), 1f)
        };
        ComplexRecipe.RecipeElement[] array2 = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement("Antihistamine", 10f)
        };
        string        id            = ComplexRecipeManager.MakeRecipeID("Apothecary", array, array2);
        ComplexRecipe complexRecipe = new ComplexRecipe(id, array, array2);

        complexRecipe.time        = 100f;
        complexRecipe.description = ITEMS.PILLS.ANTIHISTAMINE.RECIPEDESC;
        complexRecipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.Result;
        complexRecipe.fabricators = new List <Tag>
        {
            "Apothecary"
        };
        complexRecipe.sortOrder = 10;
        recipe = complexRecipe;
        return(gameObject);
    }
Ejemplo n.º 26
0
        public static void Postfix(ref GameObject go)
        {
            ComplexRecipe.RecipeElement[] ingredients = new ComplexRecipe.RecipeElement[1]
            {
                new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Katairite).tag, 100f)
            };

            ComplexRecipe.RecipeElement[] results = new ComplexRecipe.RecipeElement[2]
            {
                new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.AluminumOre).tag, 50f),
                new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Sand).tag, 50f)
            };

            new ComplexRecipe(
                ComplexRecipeManager.MakeRecipeID(
                    "RockCrusher"
                    , (IList <ComplexRecipe.RecipeElement>)ingredients
                    , (IList <ComplexRecipe.RecipeElement>)results)
                , ingredients, results
                )
            {
                time        = 40f,
                description = string.Format((string)STRINGS.BUILDINGS.PREFABS.ROCKCRUSHER.LIME_FROM_LIMESTONE_RECIPE_DESCRIPTION, (object)SimHashes.Katairite.CreateTag().ProperName(), (object)SimHashes.Wolframite.CreateTag().ProperName(), (object)SimHashes.Sand.CreateTag().ProperName()),
                nameDisplay = ComplexRecipe.RecipeNameDisplay.IngredientToResult
            }.fabricators = new List <Tag>()
            {
                TagManager.Create("RockCrusher")
            };
        }
Ejemplo n.º 27
0
        public static void ConfigureRecipes(string fabricator)
        {
            var inputs = new ComplexRecipe.RecipeElement[]
            {
                new ComplexRecipe.RecipeElement("BasicFabric".ToTag(),3f),
            };
            var outputs = new ComplexRecipe.RecipeElement[]
            {
                new ComplexRecipe.RecipeElement(ID.ToTag(),1f),
            };

            var id = ComplexRecipeManager.MakeRecipeID(fabricator,inputs,outputs);

            recipe = new ComplexRecipe(id,inputs,outputs)
            {
                time        = FABTIME,
                description = RECIPE_DESC,
                nameDisplay = ComplexRecipe.RecipeNameDisplay.Result,
                fabricators = new List <Tag> {
                    fabricator
                },
                sortOrder    = 1,
                requiredTech = Db.Get().TechItems.suitsOverlay.parentTech.Id
            };
        }
Ejemplo n.º 28
0
        public GameObject CreatePrefab()
        {
            var entity = EntityTemplates.CreateLooseEntity(
                id: Id,
                name: NameWithLink,
                desc: Description,
                mass: 1f,
                unitMass: false,
                anim: Assets.GetAnim("kukumelon_kanim"),
                initialAnim: "object",
                sceneLayer: Grid.SceneLayer.Front,
                collisionShape: EntityTemplates.CollisionShape.RECTANGLE,
                width: 0.8f,
                height: 0.7f,
                isPickupable: true);

            var foodInfo = new EdiblesManager.FoodInfo(
                id: Id,
                caloriesPerUnit: 2000000f,
                quality: 6,
                preserveTemperatue: 255.15f,
                rotTemperature: 277.15f,
                spoilTime: TUNING.FOOD.SPOIL_TIME.SLOW,
                can_rot: true);

            var food = EntityTemplates.ExtendEntityToFood(entity, foodInfo);

            new Recipe(Id, 1f, 0, null, RecipeDescription, 25)
            .SetFabricator(CookingStationConfig.ID, 100f)
            .AddIngredient(new Recipe.Ingredient(PalmeraBerryConfig.Id, 1f));

            ComplexRecipe.RecipeElement[] ingredients =
            {
                new ComplexRecipe.RecipeElement(PalmeraBerryConfig.Id, 1f)
            };

            ComplexRecipe.RecipeElement[] results =
            {
                new ComplexRecipe.RecipeElement(SteamedPalmeraBerryConfig.Id, 1f)
            };

            FriedMushroomConfig.recipe = new ComplexRecipe(ComplexRecipeManager.MakeRecipeID(CookingStationConfig.ID, ingredients, results), ingredients, results)
            {
                time                   = 100f,
                description            = RecipeDescription,
                useResultAsDescription = true,
                fabricators            = new List <Tag> {
                    CookingStationConfig.ID
                },
                sortOrder = 120
            };

            return(food);
        }
Ejemplo n.º 29
0
    private void ConfgiureRecipes()
    {
        Tag   tag       = SimHashes.Ceramic.CreateTag();
        Tag   material  = SimHashes.Clay.CreateTag();
        Tag   material2 = SimHashes.Carbon.CreateTag();
        float num       = 100f;
        float num2      = 25f;

        ComplexRecipe.RecipeElement[] array = new ComplexRecipe.RecipeElement[2]
        {
            new ComplexRecipe.RecipeElement(material, num),
            new ComplexRecipe.RecipeElement(material2, num2)
        };
        ComplexRecipe.RecipeElement[] array2 = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement(tag, num)
        };
        string        obsolete_id   = ComplexRecipeManager.MakeObsoleteRecipeID("Kiln", tag);
        string        text          = ComplexRecipeManager.MakeRecipeID("Kiln", array, array2);
        ComplexRecipe complexRecipe = new ComplexRecipe(text, array, array2);

        complexRecipe.time        = 40f;
        complexRecipe.description = string.Format(STRINGS.BUILDINGS.PREFABS.EGGCRACKER.RECIPE_DESCRIPTION, ElementLoader.FindElementByHash(SimHashes.Clay).name, ElementLoader.FindElementByHash(SimHashes.Ceramic).name);
        complexRecipe.fabricators = new List <Tag>
        {
            TagManager.Create("Kiln")
        };
        complexRecipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.Result;
        ComplexRecipeManager.Get().AddObsoleteIDMapping(obsolete_id, text);
        Tag tag2 = SimHashes.RefinedCarbon.CreateTag();

        ComplexRecipe.RecipeElement[] array3 = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement(material2, num + num2)
        };
        ComplexRecipe.RecipeElement[] array4 = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement(tag2, num)
        };
        string obsolete_id2 = ComplexRecipeManager.MakeObsoleteRecipeID("Kiln", tag2);
        string text2        = ComplexRecipeManager.MakeRecipeID("Kiln", array3, array4);

        complexRecipe             = new ComplexRecipe(text2, array3, array4);
        complexRecipe.time        = 40f;
        complexRecipe.description = string.Format(STRINGS.BUILDINGS.PREFABS.EGGCRACKER.RECIPE_DESCRIPTION, ElementLoader.FindElementByHash(SimHashes.Carbon).name, ElementLoader.FindElementByHash(SimHashes.RefinedCarbon).name);
        complexRecipe.fabricators = new List <Tag>
        {
            TagManager.Create("Kiln")
        };
        complexRecipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.Result;
        ComplexRecipeManager.Get().AddObsoleteIDMapping(obsolete_id2, text2);
    }
    public override void ConfigureBuildingTemplate(GameObject go, Tag prefab_tag)
    {
        go.AddOrGet <DropAllWorkable>();
        go.AddOrGet <BuildingComplete>().isManuallyOperated = true;
        GlassForge glassForge = go.AddOrGet <GlassForge>();

        glassForge.sideScreenStyle = ComplexFabricatorSideScreen.StyleSetting.ListQueueHybrid;
        go.AddOrGet <FabricatorIngredientStatusManager>();
        go.AddOrGet <CopyBuildingSettings>();
        ComplexFabricatorWorkable complexFabricatorWorkable = go.AddOrGet <ComplexFabricatorWorkable>();

        glassForge.duplicantOperated = true;
        BuildingTemplates.CreateComplexFabricatorStorage(go, glassForge);
        glassForge.outStorage.capacityKg = 2000f;
        glassForge.storeProduced         = true;
        glassForge.inStorage.SetDefaultStoredItemModifiers(RefineryStoredItemModifiers);
        glassForge.buildStorage.SetDefaultStoredItemModifiers(RefineryStoredItemModifiers);
        glassForge.outStorage.SetDefaultStoredItemModifiers(RefineryStoredItemModifiers);
        glassForge.outputOffset = new Vector3(1f, 0.5f);
        complexFabricatorWorkable.overrideAnims = new KAnimFile[1]
        {
            Assets.GetAnim("anim_interacts_metalrefinery_kanim")
        };
        glassForge.resultState = ComplexFabricator.ResultState.Melted;
        ConduitDispenser conduitDispenser = go.AddOrGet <ConduitDispenser>();

        conduitDispenser.storage        = glassForge.outStorage;
        conduitDispenser.conduitType    = ConduitType.Liquid;
        conduitDispenser.elementFilter  = null;
        conduitDispenser.alwaysDispense = true;
        ComplexRecipe.RecipeElement[] array = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.Sand).tag, 100f)
        };
        ComplexRecipe.RecipeElement[] array2 = new ComplexRecipe.RecipeElement[1]
        {
            new ComplexRecipe.RecipeElement(ElementLoader.FindElementByHash(SimHashes.MoltenGlass).tag, 25f)
        };
        string        obsolete_id   = ComplexRecipeManager.MakeObsoleteRecipeID("GlassForge", array[0].material);
        string        text          = ComplexRecipeManager.MakeRecipeID("GlassForge", array, array2);
        ComplexRecipe complexRecipe = new ComplexRecipe(text, array, array2);

        complexRecipe.time        = 40f;
        complexRecipe.nameDisplay = ComplexRecipe.RecipeNameDisplay.Result;
        complexRecipe.description = string.Format(STRINGS.BUILDINGS.PREFABS.GLASSFORGE.RECIPE_DESCRIPTION, ElementLoader.GetElement(array2[0].material).name, ElementLoader.GetElement(array[0].material).name);
        complexRecipe.fabricators = new List <Tag>
        {
            TagManager.Create("GlassForge")
        };
        ComplexRecipeManager.Get().AddObsoleteIDMapping(obsolete_id, text);
        Prioritizable.AddRef(go);
    }