// Copyright (c) Strange Loop Games. All rights reserved.
// See LICENSE file in the project root for full license information.
// <auto-generated />


// WORLD LAYER INFO
namespace Eco.Mods.WorldLayers
{
    using Eco.Shared.Localization;
    using Eco.Shared.Math;
    using Eco.Shared.Utils;
    using Eco.Simulation.WorldLayers.Layers;

    public partial class PlantLayerSettingsCommonGrass : PlantLayerSettings
    {
        public PlantLayerSettingsCommonGrass() : base()
        {
            this.Name = "CommonGrass";  //noloc
            this.DisplayName = Localizer.DoStr("Common Grass");
            this.InitMultiplier = 1;
            this.SyncToClient = false;
            this.Range = new Range(0f, 1f);
            this.OverrideRenderRange = new Range(0f, 0.333333f);
            this.MinColor = new Color(1f, 1f, 1f);
            this.MaxColor = new Color(0f, 1f, 0f);
            this.SumRelevant = true;
            this.Unit = "Common Grass"; //noloc
            this.VoxelsPerEntry = 5;
            this.Category = WorldLayerCategory.Plant;
            this.ValueType = WorldLayerValueType.FillRate;
            this.AreaDescription = "";
            this.Subcategory = "CommonGrass".AddSpacesBetweenCapitals(); //noloc
        }
    }
}

namespace Eco.Mods.Organisms
{
    using System.Collections.Generic;
    using Eco.Core.Items;
    using Eco.Gameplay.Blocks;
    using Eco.Gameplay.Plants;
    using Eco.Mods.TechTree;
    using Eco.Shared.Localization;
    using Eco.Shared.Math;
    using Eco.Shared.Serialization;
    using Eco.Simulation;
    using Eco.Simulation.Types;
    using Eco.World.Blocks;

    [Serialized]
    public partial class CommonGrass : PlantEntity
    {
        public CommonGrass(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { }
        public CommonGrass() { }
        static PlantSpecies species;

        [Ecopedia("Plants", "Plants", createAsSubPage: true, display: InPageTooltip.DynamicTooltip)] 
        [Tag("Plants")]
        [Localized(false, true)]
        public partial class CommonGrassSpecies : PlantSpecies
        {
            public CommonGrassSpecies() : base()
            {
                species = this;
                this.InstanceType = typeof(CommonGrass);
                this.SetDefaultProperties();

                // Info
                this.Decorative = false;
                this.Name = "CommonGrass"; //noloc
                this.DisplayName = Localizer.DoStr("Common Grass");
                // Lifetime
                this.MaturityAgeDays = 0.8f;
                // Generation
                this.Height = 1;
                // Food
                this.CalorieValue = 2;
                // Resources
                this.PostHarvestingGrowth = 0.2f;
                this.ScythingKills = false;
                this.PickableAtPercent = 0;
                this.RequireHarvestable = false;
                this.ResourceList = new List<SpeciesResource>()
                {
                    new SpeciesResource(typeof(PlantFibersItem), new Range(1, 3), 1),
                };
                this.ResourceBonusAtGrowth = 0.9f;
                // Visuals
                this.BlockType = typeof(CommonGrassBlock);
                // Climate
                this.ReleasesCO2TonsPerDay = -0.0001f;
                // WorldLayers
                this.MaxGrowthRate = 0.02f;
                this.MaxDeathRate = 0.01f;
                this.SpreadRate = 0.001f;
                this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); //noloc
                this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); //noloc
                this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); //noloc
                this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.02f }); //noloc
                this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); //noloc
                this.BlanketSpawnPercent = 1;
                this.IdealTemperatureRange = new Range(0.52f, 0.78f);
                this.IdealMoistureRange = new Range(0.32f, 0.6f);
                this.IdealWaterRange = new Range(0, 0.1f);
                this.WaterExtremes = new Range(0, 0.2f);
                this.TemperatureExtremes = new Range(0.48f, 0.82f);
                this.MoistureExtremes = new Range(0.28f, 0.62f);
                this.MaxPollutionDensity = 1;
                this.PollutionDensityTolerance = 0.1f;
                this.VoxelsPerEntry = 5;
            }

            partial void SetDefaultProperties();
        }
    }

    [Serialized]
    [Reapable]
    [Clearable]
    public partial class CommonGrassBlock :
        PlantBlock { }
}
