Exemplo n.º 1
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));
        }
Exemplo n.º 2
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;
            float  warningLowTemperature  = MIN_TEMP;
            float  warningHighTemperature = MAX_TEMP;
            float  lethalLowTemperature   = warningLowTemperature - 20f;
            float  lethalHighTemperature  = warningHighTemperature + 20f;

            wildCreature.AddOrGet <TemperatureVulnerable>().Configure(warningLowTemperature, lethalLowTemperature, warningHighTemperature, lethalHighTemperature);
            return(BaseSquirrelConfig.SetupDiet(wildCreature, diet_infos, (float)minPoopSizeKg));
        }