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);
    }
Ejemplo n.º 2
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));
    }
 public void OnSpawn(GameObject inst)
 {
     BaseLightBugConfig.SetupLoopingSounds(inst);
 }