public static GameObject CreatePuftAlpha(string id, string name, string desc, string anim_file, bool is_baby)
    {
        string     symbol_override_prefix = "alp_";
        GameObject prefab = BasePuftConfig.BasePuft(id, name, desc, "PuftAlphaBaseTrait", anim_file, is_baby, symbol_override_prefix, 258.15f, 338.15f);

        EntityTemplates.ExtendEntityToWildCreature(prefab, PuftTuning.PEN_SIZE_PER_CREATURE, 75f);
        Trait trait = Db.Get().CreateTrait("PuftAlphaBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, PuftTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - PuftTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 75f, name, false, false, true));
        List <Diet.Info> list = new List <Diet.Info>();

        list.Add(new Diet.Info(new HashSet <Tag>(new Tag[1]
        {
            SimHashes.ContaminatedOxygen.CreateTag()
        }), SimHashes.SlimeMold.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.BAD_2, "SlimeLung", 1000f, false, false));
        list.Add(new Diet.Info(new HashSet <Tag>(new Tag[1]
        {
            SimHashes.ChlorineGas.CreateTag()
        }), SimHashes.BleachStone.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.BAD_2, "SlimeLung", 1000f, false, false));
        list.Add(new Diet.Info(new HashSet <Tag>(new Tag[1]
        {
            SimHashes.Oxygen.CreateTag()
        }), SimHashes.OxyRock.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.BAD_2, "SlimeLung", 1000f, false, false));
        prefab = BasePuftConfig.SetupDiet(prefab, list.ToArray(), CALORIES_PER_KG_OF_ORE, MIN_POOP_SIZE_IN_KG);
        DiseaseSourceVisualizer diseaseSourceVisualizer = prefab.AddOrGet <DiseaseSourceVisualizer>();

        diseaseSourceVisualizer.alwaysShowDisease = "SlimeLung";
        return(prefab);
    }
    public static GameObject CreateLightBug(string id, string name, string desc, string anim_file, bool is_baby)
    {
        GameObject prefab = BaseLightBugConfig.BaseLightBug(id, name, desc, anim_file, "LightBugBlueBaseTrait", LIGHT2D.LIGHTBUG_COLOR_BLUE, DECOR.BONUS.TIER6, is_baby, "blu_");

        EntityTemplates.ExtendEntityToWildCreature(prefab, LightBugTuning.PEN_SIZE_PER_CREATURE, 25f);
        Trait trait = Db.Get().CreateTrait("LightBugBlueBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, LightBugTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - LightBugTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 5f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 25f, name, false, false, true));
        HashSet <Tag> hashSet = new HashSet <Tag>();

        hashSet.Add(TagManager.Create("SpiceBread"));
        hashSet.Add(TagManager.Create("Salsa"));
        hashSet.Add(SimHashes.Phosphorite.CreateTag());
        hashSet.Add(SimHashes.Phosphorus.CreateTag());
        prefab = BaseLightBugConfig.SetupDiet(prefab, hashSet, Tag.Invalid, CALORIES_PER_KG_OF_ORE);
        LureableMonitor.Def def = prefab.AddOrGetDef <LureableMonitor.Def>();
        def.lures = new Tag[2]
        {
            SimHashes.Phosphorite.CreateTag(),
                SimHashes.Phosphorus.CreateTag()
        };
        return(prefab);
    }
    public static GameObject CreateMoo(string id, string name, string desc, string anim_file, bool is_baby)
    {
        GameObject gameObject = BaseMooConfig.BaseMoo(id, name, CREATURES.SPECIES.MOO.DESC, "MooBaseTrait", anim_file, is_baby, null);

        EntityTemplates.ExtendEntityToWildCreature(gameObject, MooTuning.PEN_SIZE_PER_CREATURE, 75f);
        Trait trait = Db.Get().CreateTrait("MooBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, MooTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - MooTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 75f, name, false, false, true));
        HashSet <Tag> hashSet = new HashSet <Tag>();

        hashSet.Add("GasGrass".ToTag());
        Diet.Info[] infos = new Diet.Info[1]
        {
            new Diet.Info(hashSet, POOP_ELEMENT, CALORIES_PER_DAY_OF_PLANT_EATEN, KG_POOP_PER_DAY_OF_PLANT, null, 0f, false, false)
        };
        Diet diet = new Diet(infos);

        CreatureCalorieMonitor.Def def = gameObject.AddOrGetDef <CreatureCalorieMonitor.Def>();
        def.diet = diet;
        def.minPoopSizeInCalories = MIN_POOP_SIZE_IN_CALORIES;
        SolidConsumerMonitor.Def def2 = gameObject.AddOrGetDef <SolidConsumerMonitor.Def>();
        def2.diet = diet;
        return(gameObject);
    }
Beispiel #4
0
 public GameObject CreatePrefab()
 {
     return(EntityTemplates.ExtendEntityToFertileCreature(
                EntityTemplates.ExtendEntityToWildCreature(
                    CreatePacu(ID,
                               NAME,
                               DESCRIPTION,
                               "custompacu_kanim",
                               false),
                    PacuTuning.PEN_SIZE_PER_CREATURE,
                    25f),
                EGG_ID,
                EGG_NAME,
                DESCRIPTION,
                "egg_custompacu_kanim",
                PacuTuning.EGG_MASS,
                BabyBetaPacuConfig.ID,
                15f,
                5f,
                CustomPacuTuning.EGG_CHANCES_BETA,
                EGG_SORT_ORDER,
                false,
                true,
                false,
                0.75f));
 }
    public static GameObject CreateMole(string id, string name, string desc, string anim_file, bool is_baby = false)
    {
        GameObject gameObject = BaseMoleConfig.BaseMole(id, name, STRINGS.CREATURES.SPECIES.MOLE.DESC, "MoleBaseTrait", anim_file, is_baby);

        gameObject.AddTag(GameTags.Creatures.Digger);
        EntityTemplates.ExtendEntityToWildCreature(gameObject, MoleTuning.PEN_SIZE_PER_CREATURE, 100f);
        Trait trait = Db.Get().CreateTrait("MoleBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, MoleTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - MoleTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 100f, name, false, false, true));
        List <Tag> list = new List <Tag>();

        list.Add(SimHashes.Regolith.CreateTag());
        list.Add(SimHashes.Dirt.CreateTag());
        list.Add(SimHashes.IronOre.CreateTag());
        List <Diet.Info> list2 = BaseMoleConfig.SimpleOreDiet(list, CALORIES_PER_KG_OF_DIRT, TUNING.CREATURES.CONVERSION_EFFICIENCY.NORMAL);
        Diet             diet  = new Diet(list2.ToArray());

        CreatureCalorieMonitor.Def def = gameObject.AddOrGetDef <CreatureCalorieMonitor.Def>();
        def.diet = diet;
        def.minPoopSizeInCalories = MIN_POOP_SIZE_IN_CALORIES;
        SolidConsumerMonitor.Def def2 = gameObject.AddOrGetDef <SolidConsumerMonitor.Def>();
        def2.diet = diet;
        OvercrowdingMonitor.Def def3 = gameObject.AddOrGetDef <OvercrowdingMonitor.Def>();
        def3.spaceRequiredPerCreature = 0;
        gameObject.AddOrGet <LoopingSounds>();
        return(gameObject);
    }
Beispiel #6
0
        public static GameObject CreateHatch(
            string id,
            string name,
            string desc,
            string anim_file,
            bool is_baby)
        {
            GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(
                BaseHatchConfig.BaseHatch(
                    id,
                    name,
                    desc,
                    anim_file,
                    BaseTraitId,
                    is_baby,
                    SymbolOverride
                    ),
                HatchTuning.PEN_SIZE_PER_CREATURE,
                MaxAge);

            CreateTrait(name);

            List <Diet.Info> diet_infos = SturdyDiet(
                poopTag: EmitElement.CreateTag(),
                caloriesPerKg: CaloriesPerKgOfFood,
                producedConversionRate: TUNING.CREATURES.CONVERSION_EFFICIENCY.NORMAL);//nerfed effiendy from 3 to normal

            wildCreature.AddOrGet <DecorProvider>()?.SetValues(tier);
            return(BaseHatchConfig.SetupDiet(wildCreature, diet_infos, CaloriesPerKgOfFood, MinPoopSizeKg));
        }
        public static GameObject CreateSteelRollerSnake(string id, string name, string desc, string anim_file, bool is_baby)
        {
            GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(BaseRollerSnakeConfig.BaseRollerSnake(id, name, desc, anim_file, BaseTraitId, is_baby, "blu_"), RollerSnakeTuning.PEN_SIZE_PER_CREATURE, Lifespan);

            Trait trait = Db.Get().CreateTrait(BaseTraitId, name, name, null, false, null, true, true);

            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, RollerSnakeTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (float)(-RollerSnakeTuning.STANDARD_CALORIES_PER_CYCLE / 600.0), name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, Hitpoints, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, Lifespan, name, false, false, true));

            List <Diet.Info> diet_infos = BaseRollerSnakeConfig.BasicRockDiet(
                SimHashes.Carbon.CreateTag(),
                CaloriesPerKg,
                ProducedConversionRate, null, 0.0f);

            BaseRollerSnakeConfig.SetupDiet(wildCreature, diet_infos, CaloriesPerKg, MinPoopSizeInKg);

            ScaleGrowthMonitor.Def scale_monitor = wildCreature.AddOrGetDef <ScaleGrowthMonitor.Def>();
            scale_monitor.defaultGrowthRate  = (float)(1.0 / ScaleGrowthTimeCycles / 600.0);
            scale_monitor.dropMass           = SteelPerCycle * ScaleGrowthTimeCycles;
            scale_monitor.itemDroppedOnShear = EmitElement;
            scale_monitor.levelCount         = 2;
            scale_monitor.targetAtmosphere   = SimHashes.CarbonDioxide;

            return(wildCreature);
        }
Beispiel #8
0
        public static GameObject CreateCritter(
            string id,
            string name,
            string desc,
            string anim_file,
            bool is_baby)
        {
            GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(BaseDreckoConfig.BaseDrecko(id, name, desc, anim_file, BASE_TRAIT_ID, is_baby, (string)null, 308.15f, 363.15f), DreckoTuning.PEN_SIZE_PER_CREATURE);

            CreateTrait(name);

            Diet diet = new Diet(new Diet.Info[1]
            {
                new Diet.Info(new HashSet <Tag>()
                {
                    (Tag)SeaLettuceConfig.ID
                }, AlgaeDrecko.POOP_ELEMENT, AlgaeDrecko.CALORIES_PER_DAY_OF_PLANT_EATEN, AlgaeDrecko.KG_POOP_PER_DAY_OF_PLANT, (string)null, 0.0f, false, true)
            });

            CreatureCalorieMonitor.Def def1 = wildCreature.AddOrGetDef <CreatureCalorieMonitor.Def>();
            def1.diet = diet;
            def1.minPoopSizeInCalories = AlgaeDrecko.MIN_POOP_SIZE_IN_CALORIES;
            wildCreature.AddOrGetDef <SolidConsumerMonitor.Def>().diet = diet;
            ScaleGrowthMonitor.Def def2 = wildCreature.AddOrGetDef <ScaleGrowthMonitor.Def>();
            def2.defaultGrowthRate  = (float)(1.0 / (double)AlgaeDrecko.SCALE_GROWTH_TIME_IN_CYCLES / 600.0);
            def2.dropMass           = AlgaeDrecko.FIBER_PER_CYCLE * AlgaeDrecko.SCALE_GROWTH_TIME_IN_CYCLES;
            def2.itemDroppedOnShear = AlgaeDrecko.EMIT_ELEMENT;
            def2.levelCount         = 6;
            def2.targetAtmosphere   = SimHashes.CarbonDioxide;
            return(wildCreature);
        }
    public static GameObject CreateDrecko(string id, string name, string desc, string anim_file, bool is_baby)
    {
        GameObject prefab = BaseDreckoConfig.BaseDrecko(id, name, desc, anim_file, "DreckoBaseTrait", is_baby, "fbr_", 308.15f, 363.15f);

        prefab = EntityTemplates.ExtendEntityToWildCreature(prefab, DreckoTuning.PEN_SIZE_PER_CREATURE, 150f);
        Trait trait = Db.Get().CreateTrait("DreckoBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, DreckoTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - DreckoTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 150f, name, false, false, true));
        HashSet <Tag> hashSet = new HashSet <Tag>();

        hashSet.Add("SpiceVine".ToTag());
        hashSet.Add(SwampLilyConfig.ID.ToTag());
        hashSet.Add("BasicSingleHarvestPlant".ToTag());
        Diet.Info[] infos = new Diet.Info[1]
        {
            new Diet.Info(hashSet, POOP_ELEMENT, CALORIES_PER_DAY_OF_PLANT_EATEN, KG_POOP_PER_DAY_OF_PLANT, null, 0f, false, true)
        };
        Diet diet = new Diet(infos);

        CreatureCalorieMonitor.Def def = prefab.AddOrGetDef <CreatureCalorieMonitor.Def>();
        def.diet = diet;
        def.minPoopSizeInCalories = MIN_POOP_SIZE_IN_CALORIES;
        SolidConsumerMonitor.Def def2 = prefab.AddOrGetDef <SolidConsumerMonitor.Def>();
        def2.diet = diet;
        ScaleGrowthMonitor.Def def3 = prefab.AddOrGetDef <ScaleGrowthMonitor.Def>();
        def3.defaultGrowthRate  = 1f / SCALE_GROWTH_TIME_IN_CYCLES / 600f;
        def3.dropMass           = FIBER_PER_CYCLE * SCALE_GROWTH_TIME_IN_CYCLES;
        def3.itemDroppedOnShear = EMIT_ELEMENT;
        def3.levelCount         = 6;
        def3.targetAtmosphere   = SimHashes.Hydrogen;
        return(prefab);
    }
    public GameObject CreatePrefab()
    {
        GameObject prefab = CreatePacu("PacuCleaner", STRINGS.CREATURES.SPECIES.PACU.VARIANT_CLEANER.NAME, STRINGS.CREATURES.SPECIES.PACU.VARIANT_CLEANER.DESC, "pacu_kanim", false);

        prefab = EntityTemplates.ExtendEntityToWildCreature(prefab, PacuTuning.PEN_SIZE_PER_CREATURE, 25f);
        return(EntityTemplates.ExtendEntityToFertileCreature(prefab, "PacuCleanerEgg", STRINGS.CREATURES.SPECIES.PACU.VARIANT_CLEANER.EGG_NAME, STRINGS.CREATURES.SPECIES.PACU.VARIANT_CLEANER.DESC, "egg_pacu_kanim", PacuTuning.EGG_MASS, "PacuCleanerBaby", 15.000001f, 5f, PacuTuning.EGG_CHANCES_CLEANER, 501, false, true, false, 0.75f));
    }
        public static GameObject CreateOilfloater(string id, string name, string desc, string anim_file, bool is_baby)
        {
            GameObject prefab = BaseOilFloaterConfig.BaseOilFloater(id, name, desc, anim_file, BASE_TRAIT_ID, 523.15f, 743.15f, is_baby, variantSprite);

            EntityTemplates.ExtendEntityToWildCreature(prefab, OilFloaterTuning.PEN_SIZE_PER_CREATURE);
            int count = (int)prefab.AddOrGet <PrimaryElement>().Mass;

            string[] loot = new string[count];
            for (int i = 0; i < count; i++)
            {
                loot[i] = "Steel";
            }
            prefab.AddOrGet <Butcherable>().SetDrops(loot);

            DiseaseDropper.Def def = prefab.AddOrGetDef <DiseaseDropper.Def>();
            def.diseaseIdx           = Db.Get().Diseases.GetIndex(Db.Get().Diseases.ZombieSpores.id);
            def.emitFrequency        = 1f;
            def.averageEmitPerSecond = 200;
            def.singleEmitQuantity   = 10000;


            Trait trait = Db.Get().CreateTrait(BASE_TRAIT_ID, name, name, null, false, null, true, true);

            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, OilFloaterTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, -OilFloaterTuning.STANDARD_CALORIES_PER_CYCLE / 600f, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, HITPOINTS.TIER1, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, LIFESPAN.TIER3, name, false, false, true));
            List <Diet.Info> diet_infos = DietInfo(GameTags.Steel, CALORIES_PER_KG_OF_ORE, CONVERSION_EFFICIENCY.GOOD_1, null, 0f);

            return(OilFloaters.SetupDiet(prefab, diet_infos, CALORIES_PER_KG_OF_ORE, MIN_POOP_SIZE_IN_KG, 5 * Patches.Settings.ConsumptionMultiplier));
        }
Beispiel #12
0
        public const float warningHighTemperature = 873.15f; //303.15f;
        public static GameObject CreatePuft(
            string id,
            string name,
            string desc,
            string anim_file,
            bool is_baby)
        {
            GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(BasePuftConfig.BasePuft(id, name, desc, BASE_TRAIT_ID, anim_file, is_baby, "",
                                                                                                         warningLowTemperature, warningHighTemperature), PuftTuning.PEN_SIZE_PER_CREATURE);
            Trait trait = Db.Get().CreateTrait(BASE_TRAIT_ID, name, name, (string)null, false, (ChoreGroup[])null, true, true);

            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, PuftTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (float)(-(double)PuftTuning.STANDARD_CALORIES_PER_CYCLE / 600.0), name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 75f, name, false, false, true));
            GameObject go = BasePuftConfig.SetupDiet(wildCreature, CONSUME_ELEMENT.CreateTag(), EMIT_ELEMENT.CreateTag(),
                                                     DevilPuftConfig.CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_2, (string)null, 0.0f,
                                                     DevilPuftConfig.MIN_POOP_SIZE_IN_KG);

            go.AddOrGetDef <LureableMonitor.Def>().lures = new Tag[1]
            {
                SimHashes.Sulfur.CreateTag()
            };
            return(go);
        }
Beispiel #13
0
        public static GameObject CreateHatch(
            string id,
            string name,
            string desc,
            string anim_file,
            bool is_baby)
        {
            GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(
                BaseHatchConfig.BaseHatch(
                    id,
                    name,
                    desc,
                    anim_file,
                    BaseTraitId,
                    is_baby,
                    SymbolOverride
                    ),
                HatchTuning.PEN_SIZE_PER_CREATURE,
                MaxAge);

            CreateTrait(name);

            List <Diet.Info> diet_infos = MutedDiet(
                poopTag: EmitElement.CreateTag(),
                caloriesPerKg: CaloriesPerKgOfFood,
                producedConversionRate: TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_3);

            return(BaseHatchConfig.SetupDiet(wildCreature, diet_infos, CaloriesPerKgOfFood, MinPoopSizeKg));
        }
Beispiel #14
0
    public static GameObject CreatePacu(string id, string name, string desc, string anim_file, bool is_baby)
    {
        GameObject prefab = BasePacuConfig.CreatePrefab(id, "PacuTropicalBaseTrait", name, desc, anim_file, is_baby, "trp_", 303.15f, 353.15f);

        prefab = EntityTemplates.ExtendEntityToWildCreature(prefab, PacuTuning.PEN_SIZE_PER_CREATURE, 25f);
        DecorProvider decorProvider = prefab.AddOrGet <DecorProvider>();

        decorProvider.SetValues(DECOR);
        return(prefab);
    }
Beispiel #15
0
        public static GameObject CreatePacu(
            string id,
            string name,
            string desc,
            string anim_file,
            bool is_baby)
        {
            var prefab = BasePacuConfig.CreatePrefab(id, "PacuOilBaseTrait", name, desc, anim_file, is_baby, "glp_",
                                                     243.15f, 278.15f);

            var def4 = prefab.AddOrGetDef <CreatureCalorieMonitor.Def>();

            def4.diet = new Diet(new Diet.Info(new HashSet <Tag>
            {
                SimHashes.Carbon.CreateTag()
            }, SimHashes.Sulfur.CreateTag(),
                                               PacuTuning.STANDARD_CALORIES_PER_CYCLE / 140f
                                               , CREATURES.CONVERSION_EFFICIENCY.NORMAL));

            var wildCreature =
                EntityTemplates.ExtendEntityToWildCreature(prefab, PacuTuning.PEN_SIZE_PER_CREATURE, 25f);

            if (!is_baby)
            {
                wildCreature.AddComponent <Storage>().capacityKg = 10f;
                var elementConsumer = (ElementConsumer)wildCreature.AddOrGet <PassiveElementConsumer>();
                elementConsumer.elementToConsume  = INPUT_ELEMENT;
                elementConsumer.consumptionRate   = 0.2f;
                elementConsumer.capacityKG        = 10f;
                elementConsumer.consumptionRadius = 3;
                elementConsumer.showInStatusPanel = true;
                elementConsumer.sampleCellOffset  = new Vector3(0.0f, 0.0f, 0.0f);
                elementConsumer.isRequired        = false;
                elementConsumer.storeOnConsume    = true;
                elementConsumer.showDescriptor    = false;
                wildCreature.AddOrGet <UpdateElementConsumerPosition>();
                var bubbleSpawner = wildCreature.AddComponent <BubbleSpawner>();
                bubbleSpawner.element         = OUTPUT_ELEMENT;
                bubbleSpawner.emitMass        = 2f;
                bubbleSpawner.emitVariance    = 0.5f;
                bubbleSpawner.initialVelocity = new Vector2f(0, 1);
                var elementConverter = wildCreature.AddOrGet <ElementConverter>();
                elementConverter.consumedElements = new ElementConverter.ConsumedElement[1]
                {
                    new ElementConverter.ConsumedElement(INPUT_ELEMENT.CreateTag(), 0.2f)
                };
                elementConverter.outputElements = new ElementConverter.OutputElement[1]
                {
                    new ElementConverter.OutputElement(0.2f, OUTPUT_ELEMENT, 0.0f, true, true)
                };
            }

            return(wildCreature);
        }
Beispiel #16
0
        public static GameObject CreateHatch(
            string id,
            string name,
            string desc,
            string anim_file,
            bool is_baby)
        {
            GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(
                BaseHatchConfig.BaseHatch(
                    id,
                    name,
                    desc,
                    anim_file,
                    BaseTraitId,
                    is_baby,
                    SymbolOverride
                    ),
                HatchTuning.PEN_SIZE_PER_CREATURE);

            CreateTrait(name);

            List <Diet.Info> diet_infos = WoodenDiet(
                poopTag: WoodLogConfig.TAG,
                caloriesPerKg: CaloriesPerKgOfFood,
                producedConversionRate: TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_2);//nerfed effiendy from 3 to normal

            wildCreature.AddOrGet <DecorProvider>()?.SetValues(tier);
            if (!is_baby)
            {
                wildCreature.AddComponent <Storage>().capacityKg = 10f;
                ElementConsumer elementConsumer = (ElementConsumer)wildCreature.AddOrGet <PassiveElementConsumer>();
                elementConsumer.elementToConsume  = element_input;
                elementConsumer.consumptionRate   = 0.2f;
                elementConsumer.capacityKG        = 10f;
                elementConsumer.consumptionRadius = (byte)3;
                elementConsumer.showInStatusPanel = true;
                elementConsumer.sampleCellOffset  = new Vector3(0.0f, 0.0f, 0.0f);
                elementConsumer.isRequired        = false;
                elementConsumer.storeOnConsume    = true;
                elementConsumer.showDescriptor    = false;
                ElementConverter elementConverter = wildCreature.AddOrGet <ElementConverter>();
                elementConverter.consumedElements = new ElementConverter.ConsumedElement[1]
                {
                    new ElementConverter.ConsumedElement(element_input.CreateTag(), 0.2f)
                };
                elementConverter.outputElements = new ElementConverter.OutputElement[1]
                {
                    new ElementConverter.OutputElement(0.2f, element_output, 0.0f, false, false, 0.0f, 0.5f, 1f, byte.MaxValue, 0)
                };
            }

            return(BaseHatchConfig.SetupDiet(wildCreature, diet_infos, CaloriesPerKgOfFood, MinPoopSizeKg));
        }
        public static GameObject CreateOilFloater(string id, string name, string desc, string anim_file, bool is_baby)
        {
            GameObject prefab = BaseOilFloaterConfig.BaseOilFloater(id, name, desc, anim_file, BASE_TRAIT_ID, 263.15f, 313.15f, is_baby, variantSprite);

            EntityTemplates.ExtendEntityToWildCreature(prefab, CREATURES.SPACE_REQUIREMENTS.TIER4);
            Trait trait = Db.Get().CreateTrait(BASE_TRAIT_ID, name, name, null, false, null, true, true);

            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, OilFloaterTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, -OilFloaterTuning.STANDARD_CALORIES_PER_CYCLE / 600f, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, HITPOINTS.TIER1, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, LIFESPAN.TIER2, name, false, false, true));
            return(BaseOilFloaterConfig.SetupDiet(prefab, CONSUME_ELEMENT.CreateTag(), EMIT_ELEMENT.CreateTag(), CALORIES_PER_KG_OF_ORE, PHO_TUNING.CONVERSION_EFFICIENCY.NORMAL_LOW, null, 0f, MIN_POOP_SIZE_IN_KG));
        }
Beispiel #18
0
    public static GameObject CreateOilFloater(string id, string name, string desc, string anim_file, bool is_baby)
    {
        GameObject prefab = BaseOilFloaterConfig.BaseOilFloater(id, name, desc, anim_file, "OilfloaterBaseTrait", 323.15f, 413.15f, is_baby, null);

        EntityTemplates.ExtendEntityToWildCreature(prefab, OilFloaterTuning.PEN_SIZE_PER_CREATURE, 100f);
        Trait trait = Db.Get().CreateTrait("OilfloaterBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, OilFloaterTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - OilFloaterTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 100f, name, false, false, true));
        return(BaseOilFloaterConfig.SetupDiet(prefab, SimHashes.CarbonDioxide.CreateTag(), SimHashes.CrudeOil.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.NORMAL, null, 0f, MIN_POOP_SIZE_IN_KG));
    }
Beispiel #19
0
    public static GameObject CreateOilFloater(string id, string name, string desc, string anim_file, bool is_baby)
    {
        GameObject    gameObject    = BaseOilFloaterConfig.BaseOilFloater(id, name, desc, anim_file, "OilfloaterDecorBaseTrait", 283.15f, 343.15f, is_baby, "oxy_");
        DecorProvider decorProvider = gameObject.AddOrGet <DecorProvider>();

        decorProvider.SetValues(DECOR.BONUS.TIER6);
        EntityTemplates.ExtendEntityToWildCreature(gameObject, OilFloaterTuning.PEN_SIZE_PER_CREATURE, 150f);
        Trait trait = Db.Get().CreateTrait("OilfloaterDecorBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, OilFloaterTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - OilFloaterTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 150f, name, false, false, true));
        return(BaseOilFloaterConfig.SetupDiet(gameObject, SimHashes.Oxygen.CreateTag(), Tag.Invalid, CALORIES_PER_KG_OF_ORE, 0f, null, 0f, 0f));
    }
        public static GameObject CreateOilfloater(string id, string name, string desc, string anim_file, bool is_baby)
        {
            GameObject prefab = BaseOilFloaterConfig.BaseOilFloater(id, name, desc, anim_file, BASE_TRAIT_ID, 210.15f, 273.15f, is_baby, variantSprite);

            EntityTemplates.ExtendEntityToWildCreature(prefab, OilFloaterTuning.PEN_SIZE_PER_CREATURE);
            Trait trait = Db.Get().CreateTrait(BASE_TRAIT_ID, name, name, null, false, null, true, true);

            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, OilFloaterTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, -OilFloaterTuning.STANDARD_CALORIES_PER_CYCLE / 600f, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, HITPOINTS.TIER1, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, LIFESPAN.TIER3, name, false, false, true));
            List <Diet.Info> diet_infos = DietInfo(GameTags.Steel, CALORIES_PER_KG_OF_ORE, CONVERSION_EFFICIENCY.GOOD_1, null, 0f);

            return(OilFloaters.SetupDiet(prefab, diet_infos, CALORIES_PER_KG_OF_ORE, MIN_POOP_SIZE_IN_KG, 5 * Patches.Settings.ConsumptionMultiplier));
        }
    public static GameObject CreateHatch(string id, string name, string desc, string anim_file, bool is_baby)
    {
        bool       is_baby2 = is_baby;
        GameObject prefab   = BaseHatchConfig.BaseHatch(id, name, desc, anim_file, "HatchMetalBaseTrait", is_baby2, "mtl_");

        prefab = EntityTemplates.ExtendEntityToWildCreature(prefab, HatchTuning.PEN_SIZE_PER_CREATURE, 100f);
        Trait trait = Db.Get().CreateTrait("HatchMetalBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, HatchTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - HatchTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 400f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 100f, name, false, false, true));
        List <Diet.Info> diet_infos = BaseHatchConfig.MetalDiet(GameTags.Metal, CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0f);

        return(BaseHatchConfig.SetupDiet(prefab, diet_infos, CALORIES_PER_KG_OF_ORE, MIN_POOP_SIZE_IN_KG));
    }
Beispiel #22
0
    public static GameObject CreateCrab(string id, string name, string desc, string anim_file, bool is_baby, string deathDropID)
    {
        bool       is_baby2 = is_baby;
        GameObject prefab   = BaseCrabConfig.BaseCrab(id, name, desc, anim_file, "CrabBaseTrait", is_baby2, null, deathDropID);

        prefab = EntityTemplates.ExtendEntityToWildCreature(prefab, CrabTuning.PEN_SIZE_PER_CREATURE, 100f);
        Trait trait = Db.Get().CreateTrait("CrabBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, CrabTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - CrabTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 100f, name, false, false, true));
        List <Diet.Info> diet_infos = BaseCrabConfig.BasicDiet(SimHashes.Sand.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.NORMAL, null, 0f);

        return(BaseCrabConfig.SetupDiet(prefab, diet_infos, CALORIES_PER_KG_OF_ORE, MIN_POOP_SIZE_IN_KG));
    }
    public static GameObject CreatePuft(string id, string name, string desc, string anim_file, bool is_baby)
    {
        GameObject prefab = BasePuftConfig.BasePuft(id, name, STRINGS.CREATURES.SPECIES.PUFT.DESC, "PuftBaseTrait", anim_file, is_baby, null, 288.15f, 328.15f);

        EntityTemplates.ExtendEntityToWildCreature(prefab, PuftTuning.PEN_SIZE_PER_CREATURE, 75f);
        Trait trait = Db.Get().CreateTrait("PuftBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, PuftTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - PuftTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 75f, name, false, false, true));
        prefab = BasePuftConfig.SetupDiet(prefab, SimHashes.ContaminatedOxygen.CreateTag(), SimHashes.SlimeMold.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_2, "SlimeLung", 1000f, MIN_POOP_SIZE_IN_KG);
        DiseaseSourceVisualizer diseaseSourceVisualizer = prefab.AddOrGet <DiseaseSourceVisualizer>();

        diseaseSourceVisualizer.alwaysShowDisease = "SlimeLung";
        return(prefab);
    }
Beispiel #24
0
 public GameObject CreatePrefab()
 {
     return(EntityTemplates.ExtendEntityToFertileCreature(
                EntityTemplates.ExtendEntityToWildCreature(
                    CreatePacu(ID,
                               NAME,
                               DESC,
                               "pacu_kanim", false),
                    PacuTuning.PEN_SIZE_PER_CREATURE, 25f),
                EGG_ID,
                EGGNAME,
                EGGDESC,
                "egg_pacu_kanim",
                PacuTuning.EGG_MASS,
                BabyOilFishConfig.ID,
                15f, 5f, EGG_CHANCES_OIL, 502, false, true, false, 0.75f
                ));
 }
        public static GameObject CreateOilfloater(string id, string name, string desc, string anim_file, bool is_baby)
        {
            GameObject prefab = AquaticOilFloater(id, name, desc, anim_file, BASE_TRAIT_ID, 263.15f, 323.15f, is_baby, variantSprite);

            //prefab.RemoveDef<SubmergedMonitor.Def>();
            //prefab.AddOrGetDef<CreatureFallMonitor.Def>().canSwim = false;

            EntityTemplates.ExtendEntityToWildCreature(prefab, OilFloaterTuning.PEN_SIZE_PER_CREATURE);
            Trait trait = Db.Get().CreateTrait(BASE_TRAIT_ID, name, name, null, false, null, true, true);

            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, OilFloaterTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, -OilFloaterTuning.STANDARD_CALORIES_PER_CYCLE / 600f, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, HITPOINTS.TIER1, name, false, false, true));
            trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, LIFESPAN.TIER3, name, false, false, true));
            List <Diet.Info> diet_infos = DietInfo(GameTags.AnyWater, CALORIES_PER_KG_OF_ORE, CONVERSION_EFFICIENCY.GOOD_1, null, 0f);

            return(OilFloaters.SetupDiet(prefab, diet_infos, CALORIES_PER_KG_OF_ORE, MIN_POOP_SIZE_IN_KG, 15f * ILoveSlicksters.Settings.ConsumptionMultiplier));
        }
Beispiel #26
0
        public static GameObject CreateCritter(
            string id,
            string name,
            string desc,
            string anim_file,
            bool is_baby)
        {
            GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(BaseSquirrelConfig.BaseSquirrel(id, name, desc, anim_file, "SquirrelBaseTrait", is_baby, (string)null), SquirrelTuning.PEN_SIZE_PER_CREATURE);

            CreateTrait(name);
            Diet.Info[] diet_infos = Diet(
                EMIT_ELEMENT.CreateTag(), CALORIES_PER_DAY_OF_PLANT_EATEN,
                KG_POOP_PER_DAY_OF_PLANT,
                (string)null, 0.0f);
            double minPoopSizeKg = (double)MIN_POOP_SIZE_KG;

            return(BaseSquirrelConfig.SetupDiet(wildCreature, diet_infos, (float)minPoopSizeKg));
        }
Beispiel #27
0
    public static GameObject CreateLightBug(string id, string name, string desc, string anim_file, bool is_baby)
    {
        GameObject prefab = BaseLightBugConfig.BaseLightBug(id, name, desc, anim_file, "LightBugBaseTrait", LIGHT2D.LIGHTBUG_COLOR, DECOR.BONUS.TIER4, is_baby, null);

        EntityTemplates.ExtendEntityToWildCreature(prefab, LightBugTuning.PEN_SIZE_PER_CREATURE, 25f);
        Trait trait = Db.Get().CreateTrait("LightBugBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, LightBugTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - LightBugTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 5f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 25f, name, false, false, true));
        HashSet <Tag> hashSet = new HashSet <Tag>();

        hashSet.Add(TagManager.Create(PrickleFruitConfig.ID));
        hashSet.Add(TagManager.Create("GrilledPrickleFruit"));
        hashSet.Add(SimHashes.Phosphorite.CreateTag());
        return(BaseLightBugConfig.SetupDiet(prefab, hashSet, Tag.Invalid, CALORIES_PER_KG_OF_ORE));
    }
Beispiel #28
0
        public static GameObject CreateHatch(
            string id,
            string name,
            string desc,
            string anim_file,
            bool is_baby)
        {
            GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(
                BaseHatchConfig.BaseHatch(
                    id,
                    name,
                    desc,
                    anim_file,
                    BaseTraitId,
                    is_baby,
                    SymbolOverride
                    ),
                HatchTuning.PEN_SIZE_PER_CREATURE);

            CreateTrait(name);

            List <Diet.Info> diet_infos = FloralDiet(
                poopTag: GameTags.Edible,
                caloriesPerKg: CaloriesPerKgOfFood,
                producedConversionRate: TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1);//

            wildCreature.AddOrGet <DecorProvider>()?.SetValues(tier);

            DiseaseDropper.Def def = wildCreature.AddOrGetDef <DiseaseDropper.Def>();
            def.diseaseIdx           = Db.Get().Diseases.GetIndex(PollenGerms.ID);
            def.emitFrequency        = 1f;
            def.averageEmitPerSecond = 1000 * 40;
            def.singleEmitQuantity   = 0;



            IlluminationVulnerable illuminationVulnerable = wildCreature.AddOrGet <IlluminationVulnerable>();

            illuminationVulnerable.SetPrefersDarkness(false);

            wildCreature.AddOrGetDef <CreatureLightMonitor.Def>();
            return(BaseHatchConfig.SetupDiet(wildCreature, diet_infos, CaloriesPerKgOfFood, MinPoopSizeKg));
        }
Beispiel #29
0
    public static GameObject CreatePuftBleachstone(string id, string name, string desc, string anim_file, bool is_baby)
    {
        GameObject prefab = BasePuftConfig.BasePuft(id, name, desc, "PuftBleachstoneBaseTrait", anim_file, is_baby, "anti_", 258.15f, 308.15f);

        prefab = EntityTemplates.ExtendEntityToWildCreature(prefab, PuftTuning.PEN_SIZE_PER_CREATURE, 75f);
        Trait trait = Db.Get().CreateTrait("PuftBleachstoneBaseTrait", name, name, null, false, null, true, true);

        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.maxAttribute.Id, PuftTuning.STANDARD_STOMACH_SIZE, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Calories.deltaAttribute.Id, (0f - PuftTuning.STANDARD_CALORIES_PER_CYCLE) / 600f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.HitPoints.maxAttribute.Id, 25f, name, false, false, true));
        trait.Add(new AttributeModifier(Db.Get().Amounts.Age.maxAttribute.Id, 75f, name, false, false, true));
        prefab = BasePuftConfig.SetupDiet(prefab, SimHashes.ChlorineGas.CreateTag(), SimHashes.BleachStone.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_2, null, 0f, MIN_POOP_SIZE_IN_KG);
        LureableMonitor.Def def = prefab.AddOrGetDef <LureableMonitor.Def>();
        def.lures = new Tag[1]
        {
            SimHashes.BleachStone.CreateTag()
        };
        return(prefab);
    }
Beispiel #30
0
        public static GameObject CreatePacu(
            string id,
            string name,
            string desc,
            string anim_file,
            bool is_baby)
        {
            GameObject wildCreature = EntityTemplates.ExtendEntityToWildCreature(BasePacuConfig.CreatePrefab(id, BASE_TRAIT_ID, name, desc, anim_file, is_baby, null, MIN_TEMP, MAX_TEMP), PacuTuning.PEN_SIZE_PER_CREATURE);
            Diet       diet         = new Diet(new Diet.Info[6]
            {
                new Diet.Info(new HashSet <Tag>()
                {
                    SimHashes.Copper.CreateTag(),
                }, SimHashes.Gold.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false),
                new Diet.Info(new HashSet <Tag>()
                {
                    SimHashes.Aluminum.CreateTag(),
                }, SimHashes.Iron.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false),
                new Diet.Info(new HashSet <Tag>()
                {
                    SimHashes.Cuprite.CreateTag(),
                }, SimHashes.GoldAmalgam.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false),
                new Diet.Info(new HashSet <Tag>()
                {
                    SimHashes.AluminumOre.CreateTag(),
                }, SimHashes.IronOre.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false),
                // this one is refined -> ore b/c otherwise it would be unbalanced by giving the player too easy tungsten
                new Diet.Info(new HashSet <Tag>()
                {
                    SimHashes.Lead.CreateTag(),
                }, SimHashes.Wolframite.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false),
                new Diet.Info(new HashSet <Tag>()
                {
                    SimHashes.Regolith.CreateTag(),
                }, SimHashes.Salt.CreateTag(), CALORIES_PER_KG_OF_ORE, TUNING.CREATURES.CONVERSION_EFFICIENCY.GOOD_1, null, 0.0f, false, false)
            });

            wildCreature.GetDef <CreatureCalorieMonitor.Def>().diet = diet;
            wildCreature.GetDef <SolidConsumerMonitor.Def>().diet   = diet;
            return(wildCreature);
        }