Ejemplo n.º 1
0
        public static List <Diet.Info> CreateFoodDiet(Tag poopTag, float calPerDay, float poopKgPerDay)
        {
            var dietList = new List <Diet.Info>();

            foreach (var foodType in EdiblesManager.GetAllFoodTypes())
            {
                if (foodType.CaloriesPerUnit > 0.0)
                {
                    AddToDiet(dietList, foodType, poopTag, calPerDay, poopKgPerDay);
                }
            }

            return(dietList);
        }
Ejemplo n.º 2
0
        protected override void OnSpawn()
        {
            Tag myTag;

            foreach (EdiblesManager.FoodInfo foodTypes in EdiblesManager.GetAllFoodTypes())
            {
                Tag tag = foodTypes.Id.ToTag();
                if (foodTypes.CaloriesPerUnit > 0.0)
                {
                    DiscoveredResources.Instance.Discover(tag, GameTags.Edible);
                }
                if (foodTypes.CaloriesPerUnit == 0.0)
                {
                    DiscoveredResources.Instance.Discover(tag, GameTags.CookingIngredient);
                }
            }

            List <GameObject> myObjects = (Assets.GetPrefabsWithTag(GameTags.Medicine));

            foreach (GameObject myObject in myObjects)
            {
                myTag = myObject.PrefabID();
                if (myTag != "Untagged")
                {
                    DiscoveredResources.Instance.Discover(myTag, GameTags.Medicine);
                }
                ;
            }

            operational.SetActive(operational.IsOperational, false);
            GetComponent <KAnimControllerBase>().Play("off", KAnim.PlayMode.Once, 1f, 0.0f);
            filteredStorage.FilterChanged();
            temperatureAdjuster = new SimulatedTemperatureAdjuster(simulatedInternalTemperature, simulatedInternalHeatCapacity, simulatedThermalConductivity, base.GetComponent <Storage>());

            this.UpdateLogicCircuit();
        }