diff --git a/Mods/AutoGen/Plant/Agave.cs b/Mods/AutoGen/Plant/Agave.cs new file mode 100644 index 0000000..0cdb547 --- /dev/null +++ b/Mods/AutoGen/Plant/Agave.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsAgave : PlantLayerSettings + { + public PlantLayerSettingsAgave() : base() + { + this.Name = "Agave"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Agave"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Agave"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Agave : PlantEntity + { + public Agave(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Agave() { } + static PlantSpecies species; + public partial class AgaveSpecies : PlantSpecies + { + public AgaveSpecies() : base() + { + species = this; + this.InstanceType = typeof(Agave); + + // Info + this.Decorative = false; + this.Name = "Agave"; + this.DisplayName = Localizer.DoStr("Agave"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 4; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(AgaveLeavesItem), new Range(2, 6), 1), + new SpeciesResource(typeof(AgaveSeedItem), new Range(1, 2), 0.3f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(AgaveBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.GenerationSpawnCountPerPoint = new Range(5, 11); + this.GenerationSpawnPointMultiplier = 0.1f; + this.IdealTemperatureRange = new Range(0.75f, 0.85f); + this.IdealMoistureRange = new Range(0.1f, 0.25f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.7f, 1); + this.MoistureExtremes = new Range(0, 0.35f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.5f)] + public partial class AgaveBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/ArcticWillow.cs b/Mods/AutoGen/Plant/ArcticWillow.cs new file mode 100644 index 0000000..19571ca --- /dev/null +++ b/Mods/AutoGen/Plant/ArcticWillow.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsArcticWillow : PlantLayerSettings + { + public PlantLayerSettingsArcticWillow() : base() + { + this.Name = "ArcticWillow"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Arctic Willow"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Arctic Willow"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 ArcticWillow : PlantEntity + { + public ArcticWillow(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public ArcticWillow() { } + static PlantSpecies species; + public partial class ArcticWillowSpecies : PlantSpecies + { + public ArcticWillowSpecies() : base() + { + species = this; + this.InstanceType = typeof(ArcticWillow); + + // Info + this.Decorative = false; + this.Name = "ArcticWillow"; + this.DisplayName = Localizer.DoStr("Arctic Willow"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 3), 1), + new SpeciesResource(typeof(ArcticWillowSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(ArcticWillowBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.15f, MaxResourceContent = 0.3f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.05f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2 }); + this.BlanketSpawnPercent = 0.3f; + this.IdealTemperatureRange = new Range(0.12f, 0.28f); + this.IdealMoistureRange = new Range(0.36f, 0.48f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.1f, 0.3f); + this.MoistureExtremes = new Range(0.2f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + public partial class ArcticWillowBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/BarrelCactus.cs b/Mods/AutoGen/Plant/BarrelCactus.cs new file mode 100644 index 0000000..7912778 --- /dev/null +++ b/Mods/AutoGen/Plant/BarrelCactus.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsBarrelCactus : PlantLayerSettings + { + public PlantLayerSettingsBarrelCactus() : base() + { + this.Name = "BarrelCactus"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Barrel Cactus"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Barrel Cactus"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 BarrelCactus : PlantEntity + { + public BarrelCactus(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public BarrelCactus() { } + static PlantSpecies species; + public partial class BarrelCactusSpecies : PlantSpecies + { + public BarrelCactusSpecies() : base() + { + species = this; + this.InstanceType = typeof(BarrelCactus); + + // Info + this.Decorative = false; + this.Name = "BarrelCactus"; + this.DisplayName = Localizer.DoStr("Barrel Cactus"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 4; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(2, 6), 1), + new SpeciesResource(typeof(BarrelCactusSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(BarrelCactusBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.GenerationSpawnCountPerPoint = new Range(3, 8); + this.GenerationSpawnPointMultiplier = 0.1f; + this.IdealTemperatureRange = new Range(0.8f, 0.9f); + this.IdealMoistureRange = new Range(0.1f, 0.2f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.7f, 1); + this.MoistureExtremes = new Range(0, 0.38f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.5f)] + public partial class BarrelCactusBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Beans.cs b/Mods/AutoGen/Plant/Beans.cs new file mode 100644 index 0000000..88749c3 --- /dev/null +++ b/Mods/AutoGen/Plant/Beans.cs @@ -0,0 +1,109 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsBeans : PlantLayerSettings + { + public PlantLayerSettingsBeans() : base() + { + this.Name = "Beans"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Beans"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Beans"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Beans : PlantEntity + { + public Beans(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Beans() { } + static PlantSpecies species; + public partial class BeansSpecies : PlantSpecies + { + public BeansSpecies() : base() + { + species = this; + this.InstanceType = typeof(Beans); + + // Info + this.Decorative = false; + this.Name = "Beans"; + this.DisplayName = Localizer.DoStr("Beans"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 6; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(BeansItem), new Range(1, 6), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(BeansBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.5f, 0.55f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.45f, 0.65f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + public partial class BeansBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Beets.cs b/Mods/AutoGen/Plant/Beets.cs new file mode 100644 index 0000000..860e011 --- /dev/null +++ b/Mods/AutoGen/Plant/Beets.cs @@ -0,0 +1,110 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsBeets : PlantLayerSettings + { + public PlantLayerSettingsBeets() : base() + { + this.Name = "Beets"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Beets"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Beets"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Beets : PlantEntity + { + public Beets(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Beets() { } + static PlantSpecies species; + public partial class BeetsSpecies : PlantSpecies + { + public BeetsSpecies() : base() + { + species = this; + this.InstanceType = typeof(Beets); + + // Info + this.Decorative = false; + this.Name = "Beets"; + this.DisplayName = Localizer.DoStr("Beets"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 6; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(BeetItem), new Range(1, 6), 1), + new SpeciesResource(typeof(BeetSeedItem), new Range(1, 2), 0.3f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(BeetsBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.3f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.4f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.5f, 0.55f); + this.IdealMoistureRange = new Range(0.32f, 0.35f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.3f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + public partial class BeetsBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/BigBluestem.cs b/Mods/AutoGen/Plant/BigBluestem.cs new file mode 100644 index 0000000..560c5b2 --- /dev/null +++ b/Mods/AutoGen/Plant/BigBluestem.cs @@ -0,0 +1,113 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsBigBluestem : PlantLayerSettings + { + public PlantLayerSettingsBigBluestem() : base() + { + this.Name = "BigBluestem"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Big Bluestem"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Big Bluestem"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 BigBluestem : PlantEntity + { + public BigBluestem(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public BigBluestem() { } + static PlantSpecies species; + public partial class BigBluestemSpecies : PlantSpecies + { + public BigBluestemSpecies() : base() + { + species = this; + this.InstanceType = typeof(BigBluestem); + + // Info + this.Decorative = false; + this.Name = "BigBluestem"; + this.DisplayName = Localizer.DoStr("Big Bluestem"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 4; + // Resources + this.PostHarvestingGrowth = 0.2f; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.RequireHarvestable = false; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(2, 7), 1), + new SpeciesResource(typeof(BigBluestemSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(BigBluestemBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.02f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.BlanketSpawnPercent = 0.35f; + this.IdealTemperatureRange = new Range(0.63f, 0.79f); + this.IdealMoistureRange = new Range(0.32f, 0.48f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.82f); + this.MoistureExtremes = new Range(0.28f, 0.52f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.8f)] + public partial class BigBluestemBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Birch.cs b/Mods/AutoGen/Plant/Birch.cs new file mode 100644 index 0000000..92a42d4 --- /dev/null +++ b/Mods/AutoGen/Plant/Birch.cs @@ -0,0 +1,103 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsBirch : PlantLayerSettings + { + public PlantLayerSettingsBirch() : base() + { + this.Name = "Birch"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Birch"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Birch"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Birch : TreeEntity + { + public Birch(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Birch() { } + static TreeSpecies species; + public partial class BirchSpecies : TreeSpecies + { + public BirchSpecies() : base() + { + species = this; + this.InstanceType = typeof(Birch); + + // Info + this.Decorative = false; + this.Name = "Birch"; + this.DisplayName = Localizer.DoStr("Birch"); + // Lifetime + this.MaturityAgeDays = 5; + // Generation + // Food + this.CalorieValue = 12; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(0, 50), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.002f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 20 }); + this.BlanketSpawnPercent = 0.5f; + this.IdealTemperatureRange = new Range(0.21f, 0.52f); + this.IdealMoistureRange = new Range(0.48f, 0.58f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.18f, 0.6f); + this.MoistureExtremes = new Range(0.45f, 0.61f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/BoleteMushroom.cs b/Mods/AutoGen/Plant/BoleteMushroom.cs new file mode 100644 index 0000000..cb7ff53 --- /dev/null +++ b/Mods/AutoGen/Plant/BoleteMushroom.cs @@ -0,0 +1,110 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsBoleteMushroom : PlantLayerSettings + { + public PlantLayerSettingsBoleteMushroom() : base() + { + this.Name = "BoleteMushroom"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Bolete Mushroom"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Bolete Mushroom"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 BoleteMushroom : PlantEntity + { + public BoleteMushroom(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public BoleteMushroom() { } + static PlantSpecies species; + public partial class BoleteMushroomSpecies : PlantSpecies + { + public BoleteMushroomSpecies() : base() + { + species = this; + this.InstanceType = typeof(BoleteMushroom); + + // Info + this.Decorative = false; + this.Name = "BoleteMushroom"; + this.DisplayName = Localizer.DoStr("Bolete Mushroom"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 4; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(BoleteMushroomsItem), new Range(1, 5), 1), + new SpeciesResource(typeof(BoleteMushroomSporesItem), new Range(1, 2), 0.3f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(BoleteMushroomBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + public partial class BoleteMushroomBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Bunchgrass.cs b/Mods/AutoGen/Plant/Bunchgrass.cs new file mode 100644 index 0000000..96134f2 --- /dev/null +++ b/Mods/AutoGen/Plant/Bunchgrass.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsBunchgrass : PlantLayerSettings + { + public PlantLayerSettingsBunchgrass() : base() + { + this.Name = "Bunchgrass"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Bunchgrass"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Bunchgrass"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Bunchgrass : PlantEntity + { + public Bunchgrass(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Bunchgrass() { } + static PlantSpecies species; + public partial class BunchgrassSpecies : PlantSpecies + { + public BunchgrassSpecies() : base() + { + species = this; + this.InstanceType = typeof(Bunchgrass); + + // Info + this.Decorative = false; + this.Name = "Bunchgrass"; + this.DisplayName = Localizer.DoStr("Bunchgrass"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 5; + // Resources + this.PostHarvestingGrowth = 0.2f; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.RequireHarvestable = false; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 3), 1), + new SpeciesResource(typeof(BunchgrassSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(BunchgrassBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.02f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.6f, 0.65f); + this.IdealMoistureRange = new Range(0.4f, 0.45f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.3f, 0.6f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + public partial class BunchgrassBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Camas.cs b/Mods/AutoGen/Plant/Camas.cs new file mode 100644 index 0000000..f9c795d --- /dev/null +++ b/Mods/AutoGen/Plant/Camas.cs @@ -0,0 +1,109 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsCamas : PlantLayerSettings + { + public PlantLayerSettingsCamas() : base() + { + this.Name = "Camas"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Camas"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Camas"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Camas : PlantEntity + { + public Camas(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Camas() { } + static PlantSpecies species; + public partial class CamasSpecies : PlantSpecies + { + public CamasSpecies() : base() + { + species = this; + this.InstanceType = typeof(Camas); + + // Info + this.Decorative = false; + this.Name = "Camas"; + this.DisplayName = Localizer.DoStr("Camas"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 5; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(CamasBulbItem), new Range(1, 6), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(CamasBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.4f, MaxResourceContent = 0.4f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.15f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.6f, 0.7f); + this.IdealMoistureRange = new Range(0.45f, 0.5f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.45f, 0.65f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Diggable] + public partial class CamasBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Cedar.cs b/Mods/AutoGen/Plant/Cedar.cs new file mode 100644 index 0000000..25ac4a0 --- /dev/null +++ b/Mods/AutoGen/Plant/Cedar.cs @@ -0,0 +1,103 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsCedar : PlantLayerSettings + { + public PlantLayerSettingsCedar() : base() + { + this.Name = "Cedar"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Cedar"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Cedar"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Cedar : TreeEntity + { + public Cedar(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Cedar() { } + static TreeSpecies species; + public partial class CedarSpecies : TreeSpecies + { + public CedarSpecies() : base() + { + species = this; + this.InstanceType = typeof(Cedar); + + // Info + this.Decorative = false; + this.Name = "Cedar"; + this.DisplayName = Localizer.DoStr("Cedar"); + // Lifetime + this.MaturityAgeDays = 5; + // Generation + // Food + this.CalorieValue = 12; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(0, 50), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.002f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 20 }); + this.BlanketSpawnPercent = 0.5f; + this.IdealTemperatureRange = new Range(0.49f, 0.78f); + this.IdealMoistureRange = new Range(0.48f, 0.58f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.3f, 0.82f); + this.MoistureExtremes = new Range(0.45f, 0.61f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/Ceiba.cs b/Mods/AutoGen/Plant/Ceiba.cs new file mode 100644 index 0000000..d97ac17 --- /dev/null +++ b/Mods/AutoGen/Plant/Ceiba.cs @@ -0,0 +1,102 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsCeiba : PlantLayerSettings + { + public PlantLayerSettingsCeiba() : base() + { + this.Name = "Ceiba"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Ceiba"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Ceiba"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Ceiba : TreeEntity + { + public Ceiba(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Ceiba() { } + static TreeSpecies species; + public partial class CeibaSpecies : TreeSpecies + { + public CeibaSpecies() : base() + { + species = this; + this.InstanceType = typeof(Ceiba); + + // Info + this.Decorative = false; + this.Name = "Ceiba"; + this.DisplayName = Localizer.DoStr("Ceiba"); + // Lifetime + this.MaturityAgeDays = 6; + // Generation + // Food + this.CalorieValue = 12; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(0, 60), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.004f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 1 }); + this.BlanketSpawnPercent = 0.3f; + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/Clam.cs b/Mods/AutoGen/Plant/Clam.cs new file mode 100644 index 0000000..abe8437 --- /dev/null +++ b/Mods/AutoGen/Plant/Clam.cs @@ -0,0 +1,110 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsClam : PlantLayerSettings + { + public PlantLayerSettingsClam() : base() + { + this.Name = "Clam"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Clam"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Clam"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Clam : PlantEntity + { + public Clam(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Clam() { } + static PlantSpecies species; + public partial class ClamSpecies : PlantSpecies + { + public ClamSpecies() : base() + { + species = this; + this.InstanceType = typeof(Clam); + + // Info + this.Decorative = false; + this.Name = "Clam"; + this.DisplayName = Localizer.DoStr("Clam"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + this.Water = true; + // Food + this.CalorieValue = 5; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(ClamItem), new Range(1, 2), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(ClamBlock); + // Climate + this.ReleasesCO2ppmPerDay = 0; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.02f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "UnderwaterFertileGround", ConsumedCapacityPerPop = 6 }); + this.BlanketSpawnPercent = 0.3f; + this.IdealTemperatureRange = new Range(0.5f, 0.9f); + this.IdealMoistureRange = new Range(0.1f, 0.9f); + this.IdealWaterRange = new Range(0.5f, 1); + this.WaterExtremes = new Range(0.4f, 1.1f); + this.TemperatureExtremes = new Range(0.38f, 1); + this.MoistureExtremes = new Range(0, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [UnderWater] + public partial class ClamBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/CommonGrass.cs b/Mods/AutoGen/Plant/CommonGrass.cs new file mode 100644 index 0000000..bdfaa9d --- /dev/null +++ b/Mods/AutoGen/Plant/CommonGrass.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Common Grass"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Common Grass"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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; + public partial class CommonGrassSpecies : PlantSpecies + { + public CommonGrassSpecies() : base() + { + species = this; + this.InstanceType = typeof(CommonGrass); + + // Info + this.Decorative = false; + this.Name = "CommonGrass"; + this.DisplayName = Localizer.DoStr("Common Grass"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 0.8f; + // Resources + this.PostHarvestingGrowth = 0.2f; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.RequireHarvestable = false; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 3), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(CommonGrassBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.02f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.BlanketSpawnPercent = 0.2f; + this.IdealTemperatureRange = new Range(0.52f, 0.78f); + this.IdealMoistureRange = new Range(0.32f, 0.48f); + 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.52f); + this.MaxPollutionDensity = 1; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + public partial class CommonGrassBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/CookeinaMushroom.cs b/Mods/AutoGen/Plant/CookeinaMushroom.cs new file mode 100644 index 0000000..da0fabe --- /dev/null +++ b/Mods/AutoGen/Plant/CookeinaMushroom.cs @@ -0,0 +1,109 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsCookeinaMushroom : PlantLayerSettings + { + public PlantLayerSettingsCookeinaMushroom() : base() + { + this.Name = "CookeinaMushroom"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Cookeina Mushroom"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Cookeina Mushroom"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 CookeinaMushroom : PlantEntity + { + public CookeinaMushroom(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public CookeinaMushroom() { } + static PlantSpecies species; + public partial class CookeinaMushroomSpecies : PlantSpecies + { + public CookeinaMushroomSpecies() : base() + { + species = this; + this.InstanceType = typeof(CookeinaMushroom); + + // Info + this.Decorative = false; + this.Name = "CookeinaMushroom"; + this.DisplayName = Localizer.DoStr("Cookeina Mushroom"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 4; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(CookeinaMushroomsItem), new Range(1, 4), 1), + new SpeciesResource(typeof(CookeinaMushroomSporesItem), new Range(1, 2), 0.3f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(CookeinaMushroomBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + public partial class CookeinaMushroomBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Corn.cs b/Mods/AutoGen/Plant/Corn.cs new file mode 100644 index 0000000..402e10b --- /dev/null +++ b/Mods/AutoGen/Plant/Corn.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsCorn : PlantLayerSettings + { + public PlantLayerSettingsCorn() : base() + { + this.Name = "Corn"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Corn"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Corn"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Corn : PlantEntity + { + public Corn(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Corn() { } + static PlantSpecies species; + public partial class CornSpecies : PlantSpecies + { + public CornSpecies() : base() + { + species = this; + this.InstanceType = typeof(Corn); + + // Info + this.Decorative = false; + this.Name = "Corn"; + this.DisplayName = Localizer.DoStr("Corn"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 8; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(CornItem), new Range(1, 6), 1), + new SpeciesResource(typeof(CornSeedItem), new Range(1, 2), 0.3f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(CornBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.4f, MaxResourceContent = 0.4f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.4f, MaxResourceContent = 0.4f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.45f, 0.48f); + this.IdealMoistureRange = new Range(0.32f, 0.35f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.3f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [MoveEfficiency(0.6666f)] + public partial class CornBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/CreosoteBush.cs b/Mods/AutoGen/Plant/CreosoteBush.cs new file mode 100644 index 0000000..fcd27a8 --- /dev/null +++ b/Mods/AutoGen/Plant/CreosoteBush.cs @@ -0,0 +1,113 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsCreosoteBush : PlantLayerSettings + { + public PlantLayerSettingsCreosoteBush() : base() + { + this.Name = "CreosoteBush"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Creosote Bush"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Creosote Bush"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 CreosoteBush : PlantEntity + { + public CreosoteBush(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public CreosoteBush() { } + static PlantSpecies species; + public partial class CreosoteBushSpecies : PlantSpecies + { + public CreosoteBushSpecies() : base() + { + species = this; + this.InstanceType = typeof(CreosoteBush); + + // Info + this.Decorative = false; + this.Name = "CreosoteBush"; + this.DisplayName = Localizer.DoStr("Creosote Bush"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2.5f; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 3), 1), + new SpeciesResource(typeof(CreosoteBushSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(CreosoteBushBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.4f, MaxResourceContent = 0.5f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.3f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 5 }); + this.GenerationSpawnCountPerPoint = new Range(5, 11); + this.GenerationSpawnPointMultiplier = 0.1f; + this.IdealTemperatureRange = new Range(0.75f, 0.85f); + this.IdealMoistureRange = new Range(0.1f, 0.25f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.7f, 1); + this.MoistureExtremes = new Range(0, 0.35f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.5f)] + public partial class CreosoteBushBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/CriminiMushroom.cs b/Mods/AutoGen/Plant/CriminiMushroom.cs new file mode 100644 index 0000000..b563b15 --- /dev/null +++ b/Mods/AutoGen/Plant/CriminiMushroom.cs @@ -0,0 +1,108 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsCriminiMushroom : PlantLayerSettings + { + public PlantLayerSettingsCriminiMushroom() : base() + { + this.Name = "CriminiMushroom"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Crimini Mushroom"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Crimini Mushroom"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 CriminiMushroom : PlantEntity + { + public CriminiMushroom(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public CriminiMushroom() { } + static PlantSpecies species; + public partial class CriminiMushroomSpecies : PlantSpecies + { + public CriminiMushroomSpecies() : base() + { + species = this; + this.InstanceType = typeof(CriminiMushroom); + + // Info + this.Decorative = false; + this.Name = "CriminiMushroom"; + this.DisplayName = Localizer.DoStr("Crimini Mushroom"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 1; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(CriminiMushroomsItem), new Range(1, 6), 1), + new SpeciesResource(typeof(CriminiMushroomSporesItem), new Range(1, 2), 0.3f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(CriminiMushroomBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3.6f }); + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + public partial class CriminiMushroomBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/DeerLichen.cs b/Mods/AutoGen/Plant/DeerLichen.cs new file mode 100644 index 0000000..406f686 --- /dev/null +++ b/Mods/AutoGen/Plant/DeerLichen.cs @@ -0,0 +1,108 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsDeerLichen : PlantLayerSettings + { + public PlantLayerSettingsDeerLichen() : base() + { + this.Name = "DeerLichen"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Deer Lichen"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Deer Lichen"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 DeerLichen : PlantEntity + { + public DeerLichen(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public DeerLichen() { } + static PlantSpecies species; + public partial class DeerLichenSpecies : PlantSpecies + { + public DeerLichenSpecies() : base() + { + species = this; + this.InstanceType = typeof(DeerLichen); + + // Info + this.Decorative = false; + this.Name = "DeerLichen"; + this.DisplayName = Localizer.DoStr("Deer Lichen"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 1; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(DeerLichenBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.BlanketSpawnPercent = 0.6f; + this.IdealTemperatureRange = new Range(0.11f, 0.23f); + this.IdealMoistureRange = new Range(0.05f, 0.58f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.1f, 0.31f); + this.MoistureExtremes = new Range(0, 0.62f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + public partial class DeerLichenBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/DesertMoss.cs b/Mods/AutoGen/Plant/DesertMoss.cs new file mode 100644 index 0000000..e7df04d --- /dev/null +++ b/Mods/AutoGen/Plant/DesertMoss.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsDesertMoss : PlantLayerSettings + { + public PlantLayerSettingsDesertMoss() : base() + { + this.Name = "DesertMoss"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Desert Moss"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Desert Moss"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 DesertMoss : PlantEntity + { + public DesertMoss(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public DesertMoss() { } + static PlantSpecies species; + public partial class DesertMossSpecies : PlantSpecies + { + public DesertMossSpecies() : base() + { + species = this; + this.InstanceType = typeof(DesertMoss); + + // Info + this.Decorative = false; + this.Name = "DesertMoss"; + this.DisplayName = Localizer.DoStr("Desert Moss"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2.5f; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(DesertMossBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.15f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.4f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3.5f }); + this.GenerationSpawnCountPerPoint = new Range(5, 11); + this.GenerationSpawnPointMultiplier = 0.1f; + this.IdealTemperatureRange = new Range(0.85f, 0.95f); + this.IdealMoistureRange = new Range(0.2f, 0.25f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.7f, 1); + this.MoistureExtremes = new Range(0, 0.35f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + public partial class DesertMossBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/DwarfWillow.cs b/Mods/AutoGen/Plant/DwarfWillow.cs new file mode 100644 index 0000000..c8b15df --- /dev/null +++ b/Mods/AutoGen/Plant/DwarfWillow.cs @@ -0,0 +1,113 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsDwarfWillow : PlantLayerSettings + { + public PlantLayerSettingsDwarfWillow() : base() + { + this.Name = "DwarfWillow"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Dwarf Willow"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Dwarf Willow"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 DwarfWillow : PlantEntity + { + public DwarfWillow(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public DwarfWillow() { } + static PlantSpecies species; + public partial class DwarfWillowSpecies : PlantSpecies + { + public DwarfWillowSpecies() : base() + { + species = this; + this.InstanceType = typeof(DwarfWillow); + + // Info + this.Decorative = false; + this.Name = "DwarfWillow"; + this.DisplayName = Localizer.DoStr("Dwarf Willow"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 3; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1), + new SpeciesResource(typeof(DwarfWillowSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(DwarfWillowBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.15f, MaxResourceContent = 0.3f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.05f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.GenerationSpawnCountPerPoint = new Range(20, 25); + this.GenerationSpawnPointMultiplier = 0.2f; + this.IdealTemperatureRange = new Range(0.11f, 0.19f); + this.IdealMoistureRange = new Range(0.24f, 0.48f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.1f, 0.2f); + this.MoistureExtremes = new Range(0.1f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.5f)] + public partial class DwarfWillowBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Fern.cs b/Mods/AutoGen/Plant/Fern.cs new file mode 100644 index 0000000..e60ec59 --- /dev/null +++ b/Mods/AutoGen/Plant/Fern.cs @@ -0,0 +1,114 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsFern : PlantLayerSettings + { + public PlantLayerSettingsFern() : base() + { + this.Name = "Fern"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Fern"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Fern"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Fern : PlantEntity + { + public Fern(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Fern() { } + static PlantSpecies species; + public partial class FernSpecies : PlantSpecies + { + public FernSpecies() : base() + { + species = this; + this.InstanceType = typeof(Fern); + + // Info + this.Decorative = false; + this.Name = "Fern"; + this.DisplayName = Localizer.DoStr("Fern"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(FiddleheadsItem), new Range(1, 6), 1), + new SpeciesResource(typeof(FernSporeItem), new Range(1, 2), 0.2f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(FernBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.04f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2.5f }); + this.GenerationSpawnCountPerPoint = new Range(7, 13); + this.GenerationSpawnPointMultiplier = 0.2f; + this.IdealTemperatureRange = new Range(0.45f, 0.55f); + this.IdealMoistureRange = new Range(0.5f, 0.55f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.45f, 0.65f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.8f)] + public partial class FernBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/FilmyFern.cs b/Mods/AutoGen/Plant/FilmyFern.cs new file mode 100644 index 0000000..8ee0762 --- /dev/null +++ b/Mods/AutoGen/Plant/FilmyFern.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsFilmyFern : PlantLayerSettings + { + public PlantLayerSettingsFilmyFern() : base() + { + this.Name = "FilmyFern"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Filmy Fern"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Filmy Fern"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 FilmyFern : PlantEntity + { + public FilmyFern(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public FilmyFern() { } + static PlantSpecies species; + public partial class FilmyFernSpecies : PlantSpecies + { + public FilmyFernSpecies() : base() + { + species = this; + this.InstanceType = typeof(FilmyFern); + + // Info + this.Decorative = false; + this.Name = "FilmyFern"; + this.DisplayName = Localizer.DoStr("Filmy Fern"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 4), 1), + new SpeciesResource(typeof(FilmyFernSporeItem), new Range(1, 2), 0.2f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(FilmyFernBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.04f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2.5f }); + this.BlanketSpawnPercent = 0.3f; + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.5f)] + public partial class FilmyFernBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Fir.cs b/Mods/AutoGen/Plant/Fir.cs new file mode 100644 index 0000000..6e7a66b --- /dev/null +++ b/Mods/AutoGen/Plant/Fir.cs @@ -0,0 +1,103 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsFir : PlantLayerSettings + { + public PlantLayerSettingsFir() : base() + { + this.Name = "Fir"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Fir"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Fir"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Fir : TreeEntity + { + public Fir(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Fir() { } + static TreeSpecies species; + public partial class FirSpecies : TreeSpecies + { + public FirSpecies() : base() + { + species = this; + this.InstanceType = typeof(Fir); + + // Info + this.Decorative = false; + this.Name = "Fir"; + this.DisplayName = Localizer.DoStr("Fir"); + // Lifetime + this.MaturityAgeDays = 5.5f; + // Generation + // Food + this.CalorieValue = 10; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(0, 50), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.002f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 26 }); + this.BlanketSpawnPercent = 0.5f; + this.IdealTemperatureRange = new Range(0.23f, 0.35f); + this.IdealMoistureRange = new Range(0.45f, 0.55f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.19f, 0.4f); + this.MoistureExtremes = new Range(0.23f, 0.61f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/Fireweed.cs b/Mods/AutoGen/Plant/Fireweed.cs new file mode 100644 index 0000000..1cd8142 --- /dev/null +++ b/Mods/AutoGen/Plant/Fireweed.cs @@ -0,0 +1,113 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsFireweed : PlantLayerSettings + { + public PlantLayerSettingsFireweed() : base() + { + this.Name = "Fireweed"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Fireweed"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Fireweed"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Fireweed : PlantEntity + { + public Fireweed(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Fireweed() { } + static PlantSpecies species; + public partial class FireweedSpecies : PlantSpecies + { + public FireweedSpecies() : base() + { + species = this; + this.InstanceType = typeof(Fireweed); + + // Info + this.Decorative = false; + this.Name = "Fireweed"; + this.DisplayName = Localizer.DoStr("Fireweed"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 4; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(FireweedShootsItem), new Range(1, 5), 1), + new SpeciesResource(typeof(FireweedSeedItem), new Range(1, 2), 0.3f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(FireweedBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.15f, MaxResourceContent = 0.3f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.05f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.GenerationSpawnCountPerPoint = new Range(6, 8); + this.GenerationSpawnPointMultiplier = 0.2f; + this.IdealTemperatureRange = new Range(0.24f, 0.28f); + this.IdealMoistureRange = new Range(0.44f, 0.48f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.2f, 0.3f); + this.MoistureExtremes = new Range(0.2f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.8f)] + public partial class FireweedBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Heliconia.cs b/Mods/AutoGen/Plant/Heliconia.cs new file mode 100644 index 0000000..82cff02 --- /dev/null +++ b/Mods/AutoGen/Plant/Heliconia.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsHeliconia : PlantLayerSettings + { + public PlantLayerSettingsHeliconia() : base() + { + this.Name = "Heliconia"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Heliconia"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Heliconia"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Heliconia : PlantEntity + { + public Heliconia(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Heliconia() { } + static PlantSpecies species; + public partial class HeliconiaSpecies : PlantSpecies + { + public HeliconiaSpecies() : base() + { + species = this; + this.InstanceType = typeof(Heliconia); + + // Info + this.Decorative = false; + this.Name = "Heliconia"; + this.DisplayName = Localizer.DoStr("Heliconia"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1), + new SpeciesResource(typeof(HeliconiaSeedItem), new Range(1, 2), 0.2f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(HeliconiaBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.04f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2.5f }); + this.BlanketSpawnPercent = 0.2f; + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.3333f)] + public partial class HeliconiaBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Huckleberry.cs b/Mods/AutoGen/Plant/Huckleberry.cs new file mode 100644 index 0000000..f9412f1 --- /dev/null +++ b/Mods/AutoGen/Plant/Huckleberry.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsHuckleberry : PlantLayerSettings + { + public PlantLayerSettingsHuckleberry() : base() + { + this.Name = "Huckleberry"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Huckleberry"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Huckleberry"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Huckleberry : PlantEntity + { + public Huckleberry(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Huckleberry() { } + static PlantSpecies species; + public partial class HuckleberrySpecies : PlantSpecies + { + public HuckleberrySpecies() : base() + { + species = this; + this.InstanceType = typeof(Huckleberry); + + // Info + this.Decorative = false; + this.Name = "Huckleberry"; + this.DisplayName = Localizer.DoStr("Huckleberry"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 4; + // Resources + this.PostHarvestingGrowth = 0.5f; + this.PickableAtPercent = 0.8f; + this.ResourceList = new List() + { + new SpeciesResource(typeof(HuckleberriesItem), new Range(1, 8), 1), + new SpeciesResource(typeof(HuckleberrySeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(HuckleberryBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.15f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2.5f }); + this.IdealTemperatureRange = new Range(0.42f, 0.55f); + this.IdealMoistureRange = new Range(0.48f, 0.53f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.45f, 0.65f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [MoveEfficiency(0.5f)] + public partial class HuckleberryBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Jointfir.cs b/Mods/AutoGen/Plant/Jointfir.cs new file mode 100644 index 0000000..091524b --- /dev/null +++ b/Mods/AutoGen/Plant/Jointfir.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsJointfir : PlantLayerSettings + { + public PlantLayerSettingsJointfir() : base() + { + this.Name = "Jointfir"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Jointfir"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Jointfir"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Jointfir : PlantEntity + { + public Jointfir(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Jointfir() { } + static PlantSpecies species; + public partial class JointfirSpecies : PlantSpecies + { + public JointfirSpecies() : base() + { + species = this; + this.InstanceType = typeof(Jointfir); + + // Info + this.Decorative = false; + this.Name = "Jointfir"; + this.DisplayName = Localizer.DoStr("Jointfir"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(2, 6), 1), + new SpeciesResource(typeof(JointfirSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(JointfirBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.GenerationSpawnCountPerPoint = new Range(5, 9); + this.GenerationSpawnPointMultiplier = 0.3f; + this.IdealTemperatureRange = new Range(0.7f, 0.86f); + this.IdealMoistureRange = new Range(0.19f, 0.32f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.65f, 0.92f); + this.MoistureExtremes = new Range(0.12f, 0.38f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.7f)] + public partial class JointfirBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Joshua.cs b/Mods/AutoGen/Plant/Joshua.cs new file mode 100644 index 0000000..802b7d3 --- /dev/null +++ b/Mods/AutoGen/Plant/Joshua.cs @@ -0,0 +1,102 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsJoshua : PlantLayerSettings + { + public PlantLayerSettingsJoshua() : base() + { + this.Name = "Joshua"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Joshua"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Joshua"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Joshua : TreeEntity + { + public Joshua(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Joshua() { } + static TreeSpecies species; + public partial class JoshuaSpecies : TreeSpecies + { + public JoshuaSpecies() : base() + { + species = this; + this.InstanceType = typeof(Joshua); + + // Info + this.Decorative = false; + this.Name = "Joshua"; + this.DisplayName = Localizer.DoStr("Joshua"); + // Lifetime + this.MaturityAgeDays = 4.5f; + // Generation + // Food + this.CalorieValue = 12; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(0, 40), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 1 }); + this.BlanketSpawnPercent = 0.13f; + this.IdealTemperatureRange = new Range(0.75f, 0.85f); + this.IdealMoistureRange = new Range(0.2f, 0.32f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.65f, 0.9f); + this.MoistureExtremes = new Range(0.12f, 0.38f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/Kelp.cs b/Mods/AutoGen/Plant/Kelp.cs new file mode 100644 index 0000000..15dc88b --- /dev/null +++ b/Mods/AutoGen/Plant/Kelp.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsKelp : PlantLayerSettings + { + public PlantLayerSettingsKelp() : base() + { + this.Name = "Kelp"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Kelp"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Kelp"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Kelp : PlantEntity + { + public Kelp(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Kelp() { } + static PlantSpecies species; + public partial class KelpSpecies : PlantSpecies + { + public KelpSpecies() : base() + { + species = this; + this.InstanceType = typeof(Kelp); + + // Info + this.Decorative = false; + this.Name = "Kelp"; + this.DisplayName = Localizer.DoStr("Kelp"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + this.Water = true; + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(KelpItem), new Range(1, 3), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(KelpBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "UnderwaterFertileGround", ConsumedCapacityPerPop = 4 }); + this.BlanketSpawnPercent = 0.5f; + this.IdealTemperatureRange = new Range(0.5f, 0.9f); + this.IdealMoistureRange = new Range(0.1f, 0.9f); + this.IdealWaterRange = new Range(0.5f, 1); + this.WaterExtremes = new Range(0.4f, 1.1f); + this.TemperatureExtremes = new Range(0.38f, 1); + this.MoistureExtremes = new Range(0, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [UnderWater, Reapable] + [MoveEfficiency(0.5f)] + public partial class KelpBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/KingFern.cs b/Mods/AutoGen/Plant/KingFern.cs new file mode 100644 index 0000000..659250d --- /dev/null +++ b/Mods/AutoGen/Plant/KingFern.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsKingFern : PlantLayerSettings + { + public PlantLayerSettingsKingFern() : base() + { + this.Name = "KingFern"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("King Fern"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "King Fern"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 KingFern : PlantEntity + { + public KingFern(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public KingFern() { } + static PlantSpecies species; + public partial class KingFernSpecies : PlantSpecies + { + public KingFernSpecies() : base() + { + species = this; + this.InstanceType = typeof(KingFern); + + // Info + this.Decorative = false; + this.Name = "KingFern"; + this.DisplayName = Localizer.DoStr("King Fern"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1), + new SpeciesResource(typeof(KingFernSporeItem), new Range(1, 2), 0.2f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(KingFernBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.04f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2.5f }); + this.BlanketSpawnPercent = 0.2f; + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable, Diggable] + [MoveEfficiency(0.3333f)] + public partial class KingFernBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/LatticeMushroom.cs b/Mods/AutoGen/Plant/LatticeMushroom.cs new file mode 100644 index 0000000..edde9a5 --- /dev/null +++ b/Mods/AutoGen/Plant/LatticeMushroom.cs @@ -0,0 +1,109 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsLatticeMushroom : PlantLayerSettings + { + public PlantLayerSettingsLatticeMushroom() : base() + { + this.Name = "LatticeMushroom"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Lattice Mushroom"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Lattice Mushroom"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 LatticeMushroom : PlantEntity + { + public LatticeMushroom(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public LatticeMushroom() { } + static PlantSpecies species; + public partial class LatticeMushroomSpecies : PlantSpecies + { + public LatticeMushroomSpecies() : base() + { + species = this; + this.InstanceType = typeof(LatticeMushroom); + + // Info + this.Decorative = false; + this.Name = "LatticeMushroom"; + this.DisplayName = Localizer.DoStr("Lattice Mushroom"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 3; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1), + new SpeciesResource(typeof(LatticeMushroomSporesItem), new Range(1, 2), 0.3f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(LatticeMushroomBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.GenerationSpawnCountPerPoint = new Range(2, 5); + this.GenerationSpawnPointMultiplier = 0.015f; + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + public partial class LatticeMushroomBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Lupine.cs b/Mods/AutoGen/Plant/Lupine.cs new file mode 100644 index 0000000..e8153c4 --- /dev/null +++ b/Mods/AutoGen/Plant/Lupine.cs @@ -0,0 +1,110 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsLupine : PlantLayerSettings + { + public PlantLayerSettingsLupine() : base() + { + this.Name = "Lupine"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Lupine"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Lupine"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Lupine : PlantEntity + { + public Lupine(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Lupine() { } + static PlantSpecies species; + public partial class LupineSpecies : PlantSpecies + { + public LupineSpecies() : base() + { + species = this; + this.InstanceType = typeof(Lupine); + + // Info + this.Decorative = false; + this.Name = "Lupine"; + this.DisplayName = Localizer.DoStr("Lupine"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(LupineBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.GenerationSpawnCountPerPoint = new Range(15, 20); + this.GenerationSpawnPointMultiplier = 0.15f; + this.IdealTemperatureRange = new Range(0.24f, 0.28f); + this.IdealMoistureRange = new Range(0.44f, 0.48f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.2f, 0.3f); + this.MoistureExtremes = new Range(0.2f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.8f)] + public partial class LupineBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Oak.cs b/Mods/AutoGen/Plant/Oak.cs new file mode 100644 index 0000000..94bfdd7 --- /dev/null +++ b/Mods/AutoGen/Plant/Oak.cs @@ -0,0 +1,104 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsOak : PlantLayerSettings + { + public PlantLayerSettingsOak() : base() + { + this.Name = "Oak"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Oak"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Oak"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Oak : TreeEntity + { + public Oak(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Oak() { } + static TreeSpecies species; + public partial class OakSpecies : TreeSpecies + { + public OakSpecies() : base() + { + species = this; + this.InstanceType = typeof(Oak); + + // Info + this.Decorative = false; + this.Name = "Oak"; + this.DisplayName = Localizer.DoStr("Oak"); + // Lifetime + this.MaturityAgeDays = 7; + // Generation + // Food + this.CalorieValue = 12; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(0, 80), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.004f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 45 }); + this.GenerationSpawnCountPerPoint = new Range(1, 3); + this.GenerationSpawnPointMultiplier = 0.03f; + this.IdealTemperatureRange = new Range(0.45f, 0.76f); + this.IdealMoistureRange = new Range(0.43f, 0.47f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.4f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/OceanSpray.cs b/Mods/AutoGen/Plant/OceanSpray.cs new file mode 100644 index 0000000..3072473 --- /dev/null +++ b/Mods/AutoGen/Plant/OceanSpray.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsOceanSpray : PlantLayerSettings + { + public PlantLayerSettingsOceanSpray() : base() + { + this.Name = "OceanSpray"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Ocean Spray"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Ocean Spray"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 OceanSpray : PlantEntity + { + public OceanSpray(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public OceanSpray() { } + static PlantSpecies species; + public partial class OceanSpraySpecies : PlantSpecies + { + public OceanSpraySpecies() : base() + { + species = this; + this.InstanceType = typeof(OceanSpray); + + // Info + this.Decorative = false; + this.Name = "OceanSpray"; + this.DisplayName = Localizer.DoStr("Ocean Spray"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 1; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1), + new SpeciesResource(typeof(OceanSpraySeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(OceanSprayBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.04f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2.5f }); + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.5f, 0.55f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.45f, 0.65f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.3333f)] + public partial class OceanSprayBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/OldGrowthRedwood.cs b/Mods/AutoGen/Plant/OldGrowthRedwood.cs new file mode 100644 index 0000000..6cfcde6 --- /dev/null +++ b/Mods/AutoGen/Plant/OldGrowthRedwood.cs @@ -0,0 +1,104 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsOldGrowthRedwood : PlantLayerSettings + { + public PlantLayerSettingsOldGrowthRedwood() : base() + { + this.Name = "OldGrowthRedwood"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Old Growth Redwood"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Old Growth Redwood"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 OldGrowthRedwood : TreeEntity + { + public OldGrowthRedwood(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public OldGrowthRedwood() { } + static TreeSpecies species; + public partial class OldGrowthRedwoodSpecies : TreeSpecies + { + public OldGrowthRedwoodSpecies() : base() + { + species = this; + this.InstanceType = typeof(OldGrowthRedwood); + + // Info + this.Decorative = false; + this.NoSpread = true; + this.Name = "OldGrowthRedwood"; + this.DisplayName = Localizer.DoStr("Old Growth Redwood"); + // Lifetime + this.MaturityAgeDays = 30; + // Generation + // Food + this.CalorieValue = 50; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(450, 500), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.004f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 20 }); + this.BlanketSpawnPercent = 0.3f; + this.IdealTemperatureRange = new Range(0.22f, 0.48f); + this.IdealMoistureRange = new Range(0.42f, 0.48f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.18f, 0.52f); + this.MoistureExtremes = new Range(0.39f, 0.51f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/Orchid.cs b/Mods/AutoGen/Plant/Orchid.cs new file mode 100644 index 0000000..1d7e50b --- /dev/null +++ b/Mods/AutoGen/Plant/Orchid.cs @@ -0,0 +1,108 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsOrchid : PlantLayerSettings + { + public PlantLayerSettingsOrchid() : base() + { + this.Name = "Orchid"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Orchid"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Orchid"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Orchid : PlantEntity + { + public Orchid(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Orchid() { } + static PlantSpecies species; + public partial class OrchidSpecies : PlantSpecies + { + public OrchidSpecies() : base() + { + species = this; + this.InstanceType = typeof(Orchid); + + // Info + this.Decorative = false; + this.Name = "Orchid"; + this.DisplayName = Localizer.DoStr("Orchid"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 1; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1), + new SpeciesResource(typeof(OrchidSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(OrchidBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + public partial class OrchidBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Palm.cs b/Mods/AutoGen/Plant/Palm.cs new file mode 100644 index 0000000..c955997 --- /dev/null +++ b/Mods/AutoGen/Plant/Palm.cs @@ -0,0 +1,102 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsPalm : PlantLayerSettings + { + public PlantLayerSettingsPalm() : base() + { + this.Name = "Palm"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Palm"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Palm"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Palm : TreeEntity + { + public Palm(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Palm() { } + static TreeSpecies species; + public partial class PalmSpecies : TreeSpecies + { + public PalmSpecies() : base() + { + species = this; + this.InstanceType = typeof(Palm); + + // Info + this.Decorative = false; + this.Name = "Palm"; + this.DisplayName = Localizer.DoStr("Palm"); + // Lifetime + this.MaturityAgeDays = 4.5f; + // Generation + // Food + this.CalorieValue = 12; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(0, 30), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 1 }); + this.BlanketSpawnPercent = 0.3f; + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/Papaya.cs b/Mods/AutoGen/Plant/Papaya.cs new file mode 100644 index 0000000..5d52afc --- /dev/null +++ b/Mods/AutoGen/Plant/Papaya.cs @@ -0,0 +1,113 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsPapaya : PlantLayerSettings + { + public PlantLayerSettingsPapaya() : base() + { + this.Name = "Papaya"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Papaya"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Papaya"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Papaya : PlantEntity + { + public Papaya(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Papaya() { } + static PlantSpecies species; + public partial class PapayaSpecies : PlantSpecies + { + public PapayaSpecies() : base() + { + species = this; + this.InstanceType = typeof(Papaya); + + // Info + this.Decorative = false; + this.Name = "Papaya"; + this.DisplayName = Localizer.DoStr("Papaya"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 5; + // Resources + this.PostHarvestingGrowth = 0.5f; + this.PickableAtPercent = 0.8f; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PapayaItem), new Range(1, 6), 1), + new SpeciesResource(typeof(PapayaSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(PapayaBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.04f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2.5f }); + this.GenerationSpawnCountPerPoint = new Range(4, 5); + this.GenerationSpawnPointMultiplier = 0.1f; + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable, Chopable] + public partial class PapayaBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/PeatMoss.cs b/Mods/AutoGen/Plant/PeatMoss.cs new file mode 100644 index 0000000..1e64526 --- /dev/null +++ b/Mods/AutoGen/Plant/PeatMoss.cs @@ -0,0 +1,108 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsPeatMoss : PlantLayerSettings + { + public PlantLayerSettingsPeatMoss() : base() + { + this.Name = "PeatMoss"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Peat Moss"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Peat Moss"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 PeatMoss : PlantEntity + { + public PeatMoss(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public PeatMoss() { } + static PlantSpecies species; + public partial class PeatMossSpecies : PlantSpecies + { + public PeatMossSpecies() : base() + { + species = this; + this.InstanceType = typeof(PeatMoss); + + // Info + this.Decorative = false; + this.Name = "PeatMoss"; + this.DisplayName = Localizer.DoStr("Peat Moss"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(PeatMossBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.BlanketSpawnPercent = 0.6f; + this.IdealTemperatureRange = new Range(0.17f, 0.28f); + this.IdealMoistureRange = new Range(0.44f, 0.48f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.12f, 0.3f); + this.MoistureExtremes = new Range(0.2f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + public partial class PeatMossBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Pineapple.cs b/Mods/AutoGen/Plant/Pineapple.cs new file mode 100644 index 0000000..f32d83e --- /dev/null +++ b/Mods/AutoGen/Plant/Pineapple.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsPineapple : PlantLayerSettings + { + public PlantLayerSettingsPineapple() : base() + { + this.Name = "Pineapple"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Pineapple"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Pineapple"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Pineapple : PlantEntity + { + public Pineapple(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Pineapple() { } + static PlantSpecies species; + public partial class PineappleSpecies : PlantSpecies + { + public PineappleSpecies() : base() + { + species = this; + this.InstanceType = typeof(Pineapple); + + // Info + this.Decorative = false; + this.Name = "Pineapple"; + this.DisplayName = Localizer.DoStr("Pineapple"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 5; + // Resources + this.PostHarvestingGrowth = 0.5f; + this.PickableAtPercent = 0.8f; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PineappleItem), new Range(1, 3), 1), + new SpeciesResource(typeof(PineappleSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(PineappleBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.04f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2.5f }); + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.8f)] + public partial class PineappleBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/PricklyPear.cs b/Mods/AutoGen/Plant/PricklyPear.cs new file mode 100644 index 0000000..bfb1a15 --- /dev/null +++ b/Mods/AutoGen/Plant/PricklyPear.cs @@ -0,0 +1,113 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsPricklyPear : PlantLayerSettings + { + public PlantLayerSettingsPricklyPear() : base() + { + this.Name = "PricklyPear"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Prickly Pear"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Prickly Pear"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 PricklyPear : PlantEntity + { + public PricklyPear(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public PricklyPear() { } + static PlantSpecies species; + public partial class PricklyPearSpecies : PlantSpecies + { + public PricklyPearSpecies() : base() + { + species = this; + this.InstanceType = typeof(PricklyPear); + + // Info + this.Decorative = false; + this.Name = "PricklyPear"; + this.DisplayName = Localizer.DoStr("Prickly Pear"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 4; + // Resources + this.PostHarvestingGrowth = 0.5f; + this.PickableAtPercent = 0.8f; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PricklyPearFruitItem), new Range(1, 4), 1), + new SpeciesResource(typeof(PricklyPearSeedItem), new Range(1, 2), 0.2f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(PricklyPearBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.5f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.3f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 4.5f }); + this.GenerationSpawnCountPerPoint = new Range(2, 5); + this.GenerationSpawnPointMultiplier = 0.1f; + this.IdealTemperatureRange = new Range(0.72f, 0.85f); + this.IdealMoistureRange = new Range(0.25f, 0.35f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.7f, 1); + this.MoistureExtremes = new Range(0, 0.35f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [MoveEfficiency(0.625f)] + public partial class PricklyPearBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Pumpkin.cs b/Mods/AutoGen/Plant/Pumpkin.cs new file mode 100644 index 0000000..c5b546d --- /dev/null +++ b/Mods/AutoGen/Plant/Pumpkin.cs @@ -0,0 +1,109 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsPumpkin : PlantLayerSettings + { + public PlantLayerSettingsPumpkin() : base() + { + this.Name = "Pumpkin"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Pumpkin"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Pumpkin"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Pumpkin : PlantEntity + { + public Pumpkin(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Pumpkin() { } + static PlantSpecies species; + public partial class PumpkinSpecies : PlantSpecies + { + public PumpkinSpecies() : base() + { + species = this; + this.InstanceType = typeof(Pumpkin); + + // Info + this.Decorative = false; + this.Name = "Pumpkin"; + this.DisplayName = Localizer.DoStr("Pumpkin"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 8; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PumpkinItem), new Range(1, 4), 1), + new SpeciesResource(typeof(PumpkinSeedItem), new Range(1, 2), 0.2f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(PumpkinBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.52f, 0.55f); + this.IdealMoistureRange = new Range(0.32f, 0.35f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.3f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [MoveEfficiency(0.8f)] + public partial class PumpkinBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Redwood.cs b/Mods/AutoGen/Plant/Redwood.cs new file mode 100644 index 0000000..469069f --- /dev/null +++ b/Mods/AutoGen/Plant/Redwood.cs @@ -0,0 +1,103 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsRedwood : PlantLayerSettings + { + public PlantLayerSettingsRedwood() : base() + { + this.Name = "Redwood"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Redwood"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Redwood"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Redwood : TreeEntity + { + public Redwood(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Redwood() { } + static TreeSpecies species; + public partial class RedwoodSpecies : TreeSpecies + { + public RedwoodSpecies() : base() + { + species = this; + this.InstanceType = typeof(Redwood); + + // Info + this.Decorative = false; + this.Name = "Redwood"; + this.DisplayName = Localizer.DoStr("Redwood"); + // Lifetime + this.MaturityAgeDays = 6; + // Generation + // Food + this.CalorieValue = 12; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(0, 60), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.004f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 20 }); + this.BlanketSpawnPercent = 0.3f; + this.IdealTemperatureRange = new Range(0.22f, 0.48f); + this.IdealMoistureRange = new Range(0.42f, 0.48f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.18f, 0.52f); + this.MoistureExtremes = new Range(0.39f, 0.51f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/Rice.cs b/Mods/AutoGen/Plant/Rice.cs new file mode 100644 index 0000000..361a4c8 --- /dev/null +++ b/Mods/AutoGen/Plant/Rice.cs @@ -0,0 +1,108 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsRice : PlantLayerSettings + { + public PlantLayerSettingsRice() : base() + { + this.Name = "Rice"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Rice"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Rice"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Rice : PlantEntity + { + public Rice(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Rice() { } + static PlantSpecies species; + public partial class RiceSpecies : PlantSpecies + { + public RiceSpecies() : base() + { + species = this; + this.InstanceType = typeof(Rice); + + // Info + this.Decorative = false; + this.Name = "Rice"; + this.DisplayName = Localizer.DoStr("Rice"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(RiceItem), new Range(1, 9), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(RiceBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3.6f }); + this.IdealTemperatureRange = new Range(0.47f, 0.49f); + this.IdealMoistureRange = new Range(0.32f, 0.35f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.3f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + public partial class RiceBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Sagebrush.cs b/Mods/AutoGen/Plant/Sagebrush.cs new file mode 100644 index 0000000..0dfe815 --- /dev/null +++ b/Mods/AutoGen/Plant/Sagebrush.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsSagebrush : PlantLayerSettings + { + public PlantLayerSettingsSagebrush() : base() + { + this.Name = "Sagebrush"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Sagebrush"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Sagebrush"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Sagebrush : PlantEntity + { + public Sagebrush(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Sagebrush() { } + static PlantSpecies species; + public partial class SagebrushSpecies : PlantSpecies + { + public SagebrushSpecies() : base() + { + species = this; + this.InstanceType = typeof(Sagebrush); + + // Info + this.Decorative = false; + this.Name = "Sagebrush"; + this.DisplayName = Localizer.DoStr("Sagebrush"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2.5f; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 4), 1), + new SpeciesResource(typeof(SagebrushSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(SagebrushBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.15f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.4f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3.5f }); + this.IdealTemperatureRange = new Range(0.85f, 0.95f); + this.IdealMoistureRange = new Range(0.1f, 0.2f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.7f, 1); + this.MoistureExtremes = new Range(0, 0.38f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.5f)] + public partial class SagebrushBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/SaguaroCactus.cs b/Mods/AutoGen/Plant/SaguaroCactus.cs new file mode 100644 index 0000000..c380bcb --- /dev/null +++ b/Mods/AutoGen/Plant/SaguaroCactus.cs @@ -0,0 +1,104 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsSaguaroCactus : PlantLayerSettings + { + public PlantLayerSettingsSaguaroCactus() : base() + { + this.Name = "SaguaroCactus"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Saguaro Cactus"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Saguaro Cactus"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 SaguaroCactus : TreeEntity + { + public SaguaroCactus(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public SaguaroCactus() { } + static TreeSpecies species; + public partial class SaguaroCactusSpecies : TreeSpecies + { + public SaguaroCactusSpecies() : base() + { + species = this; + this.InstanceType = typeof(SaguaroCactus); + + // Info + this.Decorative = false; + this.Name = "SaguaroCactus"; + this.DisplayName = Localizer.DoStr("Saguaro Cactus"); + // Lifetime + this.MaturityAgeDays = 4; + // Generation + // Food + this.CalorieValue = 12; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(0, 30), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 4 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 19 }); + this.GenerationSpawnCountPerPoint = new Range(3, 7); + this.GenerationSpawnPointMultiplier = 0.09f; + this.IdealTemperatureRange = new Range(0.8f, 0.9f); + this.IdealMoistureRange = new Range(0.1f, 0.2f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.7f, 1); + this.MoistureExtremes = new Range(0, 0.38f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/Salal.cs b/Mods/AutoGen/Plant/Salal.cs new file mode 100644 index 0000000..3d3e165 --- /dev/null +++ b/Mods/AutoGen/Plant/Salal.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsSalal : PlantLayerSettings + { + public PlantLayerSettingsSalal() : base() + { + this.Name = "Salal"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Salal"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Salal"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Salal : PlantEntity + { + public Salal(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Salal() { } + static PlantSpecies species; + public partial class SalalSpecies : PlantSpecies + { + public SalalSpecies() : base() + { + species = this; + this.InstanceType = typeof(Salal); + + // Info + this.Decorative = false; + this.Name = "Salal"; + this.DisplayName = Localizer.DoStr("Salal"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 0.5f; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.RequireHarvestable = false; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 4), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(SalalBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.08f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.05f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.05f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.05f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.BlanketSpawnPercent = 0.4f; + this.IdealTemperatureRange = new Range(0.22f, 0.78f); + this.IdealMoistureRange = new Range(0.52f, 0.58f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.19f, 0.81f); + this.MoistureExtremes = new Range(0.48f, 0.62f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.5f)] + public partial class SalalBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Saxifrage.cs b/Mods/AutoGen/Plant/Saxifrage.cs new file mode 100644 index 0000000..6e09752 --- /dev/null +++ b/Mods/AutoGen/Plant/Saxifrage.cs @@ -0,0 +1,110 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsSaxifrage : PlantLayerSettings + { + public PlantLayerSettingsSaxifrage() : base() + { + this.Name = "Saxifrage"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Saxifrage"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Saxifrage"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Saxifrage : PlantEntity + { + public Saxifrage(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Saxifrage() { } + static PlantSpecies species; + public partial class SaxifrageSpecies : PlantSpecies + { + public SaxifrageSpecies() : base() + { + species = this; + this.InstanceType = typeof(Saxifrage); + + // Info + this.Decorative = false; + this.Name = "Saxifrage"; + this.DisplayName = Localizer.DoStr("Saxifrage"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 4), 1), + new SpeciesResource(typeof(SaxifrageSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(SaxifrageBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2 }); + this.BlanketSpawnPercent = 0.3f; + this.IdealTemperatureRange = new Range(0.18f, 0.28f); + this.IdealMoistureRange = new Range(0.44f, 0.48f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.15f, 0.3f); + this.MoistureExtremes = new Range(0.2f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.8f)] + public partial class SaxifrageBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Seagrass.cs b/Mods/AutoGen/Plant/Seagrass.cs new file mode 100644 index 0000000..e8233b8 --- /dev/null +++ b/Mods/AutoGen/Plant/Seagrass.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsSeagrass : PlantLayerSettings + { + public PlantLayerSettingsSeagrass() : base() + { + this.Name = "Seagrass"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Seagrass"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Seagrass"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Seagrass : PlantEntity + { + public Seagrass(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Seagrass() { } + static PlantSpecies species; + public partial class SeagrassSpecies : PlantSpecies + { + public SeagrassSpecies() : base() + { + species = this; + this.InstanceType = typeof(Seagrass); + + // Info + this.Decorative = false; + this.Name = "Seagrass"; + this.DisplayName = Localizer.DoStr("Seagrass"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + this.Water = true; + // Food + this.CalorieValue = 3; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 4), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(SeagrassBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "UnderwaterFertileGround", ConsumedCapacityPerPop = 4 }); + this.BlanketSpawnPercent = 0.5f; + this.IdealTemperatureRange = new Range(0.5f, 0.9f); + this.IdealMoistureRange = new Range(0.1f, 0.9f); + this.IdealWaterRange = new Range(0.5f, 1); + this.WaterExtremes = new Range(0.4f, 1.1f); + this.TemperatureExtremes = new Range(0.38f, 1); + this.MoistureExtremes = new Range(0, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [UnderWater, Reapable] + [MoveEfficiency(0.5f)] + public partial class SeagrassBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Spruce.cs b/Mods/AutoGen/Plant/Spruce.cs new file mode 100644 index 0000000..30af3ef --- /dev/null +++ b/Mods/AutoGen/Plant/Spruce.cs @@ -0,0 +1,102 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsSpruce : PlantLayerSettings + { + public PlantLayerSettingsSpruce() : base() + { + this.Name = "Spruce"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Spruce"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.05f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Spruce"; + this.VoxelsPerEntry = 20; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Spruce : TreeEntity + { + public Spruce(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Spruce() { } + static TreeSpecies species; + public partial class SpruceSpecies : TreeSpecies + { + public SpruceSpecies() : base() + { + species = this; + this.InstanceType = typeof(Spruce); + + // Info + this.Decorative = false; + this.Name = "Spruce"; + this.DisplayName = Localizer.DoStr("Spruce"); + // Lifetime + this.MaturityAgeDays = 5.5f; + // Generation + // Food + this.CalorieValue = 12; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(LogItem), new Range(0, 50), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + // Climate + this.ReleasesCO2ppmPerDay = -0.002f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "CanopySpace", ConsumedCapacityPerPop = 26 }); + this.BlanketSpawnPercent = 0.5f; + this.IdealTemperatureRange = new Range(0.23f, 0.35f); + this.IdealMoistureRange = new Range(0.45f, 0.55f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.19f, 0.4f); + this.MoistureExtremes = new Range(0.23f, 0.61f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 20; + + } + } + } +} diff --git a/Mods/AutoGen/Plant/Sunflower.cs b/Mods/AutoGen/Plant/Sunflower.cs new file mode 100644 index 0000000..5510dce --- /dev/null +++ b/Mods/AutoGen/Plant/Sunflower.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsSunflower : PlantLayerSettings + { + public PlantLayerSettingsSunflower() : base() + { + this.Name = "Sunflower"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Sunflower"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Sunflower"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Sunflower : PlantEntity + { + public Sunflower(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Sunflower() { } + static PlantSpecies species; + public partial class SunflowerSpecies : PlantSpecies + { + public SunflowerSpecies() : base() + { + species = this; + this.InstanceType = typeof(Sunflower); + + // Info + this.Decorative = false; + this.Name = "Sunflower"; + this.DisplayName = Localizer.DoStr("Sunflower"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 3; + // Resources + this.PostHarvestingGrowth = 0; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 5), 1), + new SpeciesResource(typeof(SunflowerSeedItem), new Range(2, 4), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(SunflowerBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.4f, MaxResourceContent = 0.4f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.4f, MaxResourceContent = 0.4f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.45f, 0.48f); + this.IdealMoistureRange = new Range(0.32f, 0.35f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.3f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.3333f)] + public partial class SunflowerBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Switchgrass.cs b/Mods/AutoGen/Plant/Switchgrass.cs new file mode 100644 index 0000000..9cbd81a --- /dev/null +++ b/Mods/AutoGen/Plant/Switchgrass.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsSwitchgrass : PlantLayerSettings + { + public PlantLayerSettingsSwitchgrass() : base() + { + this.Name = "Switchgrass"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Switchgrass"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Switchgrass"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Switchgrass : PlantEntity + { + public Switchgrass(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Switchgrass() { } + static PlantSpecies species; + public partial class SwitchgrassSpecies : PlantSpecies + { + public SwitchgrassSpecies() : base() + { + species = this; + this.InstanceType = typeof(Switchgrass); + + // Info + this.Decorative = false; + this.Name = "Switchgrass"; + this.DisplayName = Localizer.DoStr("Switchgrass"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 0.5f; + // Resources + this.PostHarvestingGrowth = 0.2f; + this.ScythingKills = false; + this.PickableAtPercent = 0; + this.RequireHarvestable = false; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 3), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(SwitchgrassBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.02f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.BlanketSpawnPercent = 0.35f; + this.IdealTemperatureRange = new Range(0.42f, 0.62f); + this.IdealMoistureRange = new Range(0.32f, 0.48f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.38f, 0.62f); + this.MoistureExtremes = new Range(0.28f, 0.52f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.8f)] + public partial class SwitchgrassBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Taro.cs b/Mods/AutoGen/Plant/Taro.cs new file mode 100644 index 0000000..a5e6ffe --- /dev/null +++ b/Mods/AutoGen/Plant/Taro.cs @@ -0,0 +1,112 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsTaro : PlantLayerSettings + { + public PlantLayerSettingsTaro() : base() + { + this.Name = "Taro"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Taro"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Taro"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Taro : PlantEntity + { + public Taro(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Taro() { } + static PlantSpecies species; + public partial class TaroSpecies : PlantSpecies + { + public TaroSpecies() : base() + { + species = this; + this.InstanceType = typeof(Taro); + + // Info + this.Decorative = false; + this.Name = "Taro"; + this.DisplayName = Localizer.DoStr("Taro"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 4; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(TaroRootItem), new Range(1, 4), 1), + new SpeciesResource(typeof(TaroSeedItem), new Range(1, 2), 0.2f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(TaroBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.02f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.04f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 2.5f }); + this.BlanketSpawnPercent = 0.2f; + this.IdealTemperatureRange = new Range(0.65f, 0.75f); + this.IdealMoistureRange = new Range(0.75f, 0.95f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.6f, 0.8f); + this.MoistureExtremes = new Range(0.7f, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Diggable] + [MoveEfficiency(0.3333f)] + public partial class TaroBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Tomatoes.cs b/Mods/AutoGen/Plant/Tomatoes.cs new file mode 100644 index 0000000..11c20f2 --- /dev/null +++ b/Mods/AutoGen/Plant/Tomatoes.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsTomatoes : PlantLayerSettings + { + public PlantLayerSettingsTomatoes() : base() + { + this.Name = "Tomatoes"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Tomatoes"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Tomatoes"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Tomatoes : PlantEntity + { + public Tomatoes(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Tomatoes() { } + static PlantSpecies species; + public partial class TomatoesSpecies : PlantSpecies + { + public TomatoesSpecies() : base() + { + species = this; + this.InstanceType = typeof(Tomatoes); + + // Info + this.Decorative = false; + this.Name = "Tomatoes"; + this.DisplayName = Localizer.DoStr("Tomatoes"); + this.IsConsideredNearbyFoodDuringSpawnCheck = true; + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 5; + // Resources + this.PostHarvestingGrowth = 0.5f; + this.PickableAtPercent = 0.8f; + this.ResourceList = new List() + { + new SpeciesResource(typeof(TomatoItem), new Range(1, 5), 1), + new SpeciesResource(typeof(TomatoSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(TomatoesBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3.5f }); + this.IdealTemperatureRange = new Range(0.7f, 0.75f); + this.IdealMoistureRange = new Range(0.42f, 0.45f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.3f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [MoveEfficiency(0.6666f)] + public partial class TomatoesBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Trillium.cs b/Mods/AutoGen/Plant/Trillium.cs new file mode 100644 index 0000000..8c0524b --- /dev/null +++ b/Mods/AutoGen/Plant/Trillium.cs @@ -0,0 +1,108 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsTrillium : PlantLayerSettings + { + public PlantLayerSettingsTrillium() : base() + { + this.Name = "Trillium"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Trillium"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Trillium"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Trillium : PlantEntity + { + public Trillium(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Trillium() { } + static PlantSpecies species; + public partial class TrilliumSpecies : PlantSpecies + { + public TrilliumSpecies() : base() + { + species = this; + this.InstanceType = typeof(Trillium); + + // Info + this.Decorative = false; + this.Name = "Trillium"; + this.DisplayName = Localizer.DoStr("Trillium"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 3), 1), + new SpeciesResource(typeof(TrilliumSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(TrilliumBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.42f, 0.55f); + this.IdealMoistureRange = new Range(0.48f, 0.53f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.45f, 0.65f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + public partial class TrilliumBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Urchin.cs b/Mods/AutoGen/Plant/Urchin.cs new file mode 100644 index 0000000..a3743cf --- /dev/null +++ b/Mods/AutoGen/Plant/Urchin.cs @@ -0,0 +1,107 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsUrchin : PlantLayerSettings + { + public PlantLayerSettingsUrchin() : base() + { + this.Name = "Urchin"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Urchin"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Urchin"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Urchin : PlantEntity + { + public Urchin(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Urchin() { } + static PlantSpecies species; + public partial class UrchinSpecies : PlantSpecies + { + public UrchinSpecies() : base() + { + species = this; + this.InstanceType = typeof(Urchin); + + // Info + this.Decorative = false; + this.Name = "Urchin"; + this.DisplayName = Localizer.DoStr("Urchin"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + this.Water = true; + // Food + this.CalorieValue = 5; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(UrchinItem), new Range(1, 3), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(UrchinBlock); + // Climate + this.ReleasesCO2ppmPerDay = 0; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "UnderwaterFertileGround", ConsumedCapacityPerPop = 6 }); + this.BlanketSpawnPercent = 0.2f; + this.IdealTemperatureRange = new Range(0.5f, 0.9f); + this.IdealMoistureRange = new Range(0.1f, 0.9f); + this.IdealWaterRange = new Range(0.5f, 1); + this.WaterExtremes = new Range(0.4f, 1.1f); + this.TemperatureExtremes = new Range(0.38f, 1); + this.MoistureExtremes = new Range(0, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [UnderWater] + public partial class UrchinBlock : + InteractablePlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Waterweed.cs b/Mods/AutoGen/Plant/Waterweed.cs new file mode 100644 index 0000000..5b18a5b --- /dev/null +++ b/Mods/AutoGen/Plant/Waterweed.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsWaterweed : PlantLayerSettings + { + public PlantLayerSettingsWaterweed() : base() + { + this.Name = "Waterweed"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Waterweed"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Waterweed"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Waterweed : PlantEntity + { + public Waterweed(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Waterweed() { } + static PlantSpecies species; + public partial class WaterweedSpecies : PlantSpecies + { + public WaterweedSpecies() : base() + { + species = this; + this.InstanceType = typeof(Waterweed); + + // Info + this.Decorative = false; + this.Name = "Waterweed"; + this.DisplayName = Localizer.DoStr("Waterweed"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + this.Water = true; + // Food + this.CalorieValue = 5; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 4), 1) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(WaterweedBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.000005f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.01f, MaxResourceContent = 0.01f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "UnderwaterFertileGround", ConsumedCapacityPerPop = 6 }); + this.BlanketSpawnPercent = 0.7f; + this.IdealTemperatureRange = new Range(0.5f, 0.9f); + this.IdealMoistureRange = new Range(0.1f, 0.9f); + this.IdealWaterRange = new Range(0, 0.03f); + this.WaterExtremes = new Range(0, 0.05f); + this.TemperatureExtremes = new Range(0.38f, 1); + this.MoistureExtremes = new Range(0, 1); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [UnderWater, Reapable] + [MoveEfficiency(0.5f)] + public partial class WaterweedBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/Wheat.cs b/Mods/AutoGen/Plant/Wheat.cs new file mode 100644 index 0000000..069bda2 --- /dev/null +++ b/Mods/AutoGen/Plant/Wheat.cs @@ -0,0 +1,111 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsWheat : PlantLayerSettings + { + public PlantLayerSettingsWheat() : base() + { + this.Name = "Wheat"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("Wheat"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "Wheat"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 Wheat : PlantEntity + { + public Wheat(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public Wheat() { } + static PlantSpecies species; + public partial class WheatSpecies : PlantSpecies + { + public WheatSpecies() : base() + { + species = this; + this.InstanceType = typeof(Wheat); + + // Info + this.Decorative = false; + this.Name = "Wheat"; + this.DisplayName = Localizer.DoStr("Wheat"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 5; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(WheatItem), new Range(1, 6), 1), + new SpeciesResource(typeof(WheatSeedItem), new Range(1, 2), 0.2f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(WheatBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Nitrogen", HalfSpeedConcentration = 0.3f, MaxResourceContent = 0.3f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.2f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Potassium", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.1f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.15f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.IdealTemperatureRange = new Range(0.55f, 0.58f); + this.IdealMoistureRange = new Range(0.32f, 0.35f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.4f, 0.8f); + this.MoistureExtremes = new Range(0.3f, 0.5f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.5f)] + public partial class WheatBlock : + PlantBlock { } +} diff --git a/Mods/AutoGen/Plant/WhiteBursage.cs b/Mods/AutoGen/Plant/WhiteBursage.cs new file mode 100644 index 0000000..2ea8092 --- /dev/null +++ b/Mods/AutoGen/Plant/WhiteBursage.cs @@ -0,0 +1,110 @@ +namespace Eco.Mods.TechTree +{ + // [DoNotLocalize] +} +// 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 PlantLayerSettingsWhiteBursage : PlantLayerSettings + { + public PlantLayerSettingsWhiteBursage() : base() + { + this.Name = "WhiteBursage"; + this.DisplayName = string.Format("{0} {1}", Localizer.DoStr("White Bursage"), Localizer.DoStr("Population")); + this.InitMultiplier = 1; + this.SyncToClient = false; + this.Range = new Range(0f, 1f); + this.RenderRange = new Range(0f, 0.333333f); + this.MinColor = new Color(1f, 1f, 1f); + this.MaxColor = new Color(0f, 1f, 0f); + this.Percent = false; + this.SumRelevant = true; + this.Unit = "White Bursage"; + this.VoxelsPerEntry = 5; + this.Category = WorldLayerCategory.Plant; + this.ValueType = WorldLayerValueType.Percent; + this.AreaDescription = ""; + } + } +} + +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + 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 WhiteBursage : PlantEntity + { + public WhiteBursage(WorldPosition3i mapPos, PlantPack plantPack) : base(species, mapPos, plantPack) { } + public WhiteBursage() { } + static PlantSpecies species; + public partial class WhiteBursageSpecies : PlantSpecies + { + public WhiteBursageSpecies() : base() + { + species = this; + this.InstanceType = typeof(WhiteBursage); + + // Info + this.Decorative = false; + this.Name = "WhiteBursage"; + this.DisplayName = Localizer.DoStr("White Bursage"); + // Lifetime + this.MaturityAgeDays = 0.8f; + // Generation + // Food + this.CalorieValue = 2; + // Resources + this.PostHarvestingGrowth = 0; + this.PickableAtPercent = 0; + this.ResourceList = new List() + { + new SpeciesResource(typeof(PlantFibersItem), new Range(1, 3), 1), + new SpeciesResource(typeof(WhiteBursageSeedItem), new Range(1, 2), 0.1f) + }; + this.ResourceBonusAtGrowth = 0.9f; + // Visuals + this.BlockType = typeof(WhiteBursageBlock); + // Climate + this.ReleasesCO2ppmPerDay = -0.00001f; + // WorldLayers + this.MaxGrowthRate = 0.01f; + this.MaxDeathRate = 0.005f; + this.SpreadRate = 0.001f; + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "Phosphorus", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.2f }); + this.ResourceConstraints.Add(new ResourceConstraint() { LayerName = "SoilMoisture", HalfSpeedConcentration = 0.1f, MaxResourceContent = 0.05f }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "FertileGround", ConsumedCapacityPerPop = 1 }); + this.CapacityConstraints.Add(new CapacityConstraint() { CapacityLayerName = "ShrubSpace", ConsumedCapacityPerPop = 3 }); + this.BlanketSpawnPercent = 0.6f; + this.IdealTemperatureRange = new Range(0.75f, 0.85f); + this.IdealMoistureRange = new Range(0.2f, 0.32f); + this.IdealWaterRange = new Range(0, 0.1f); + this.WaterExtremes = new Range(0, 0.2f); + this.TemperatureExtremes = new Range(0.65f, 0.9f); + this.MoistureExtremes = new Range(0.12f, 0.38f); + this.MaxPollutionDensity = 0.7f; + this.PollutionDensityTolerance = 0.1f; + this.VoxelsPerEntry = 5; + + } + } + } + [Serialized] + [Reapable] + [MoveEfficiency(0.7f)] + public partial class WhiteBursageBlock : + PlantBlock { } +} diff --git a/Mods/Organisms/Animal/BighornSheep.cs b/Mods/Organisms/Animal/BighornSheep.cs new file mode 100644 index 0000000..3337e5d --- /dev/null +++ b/Mods/Organisms/Animal/BighornSheep.cs @@ -0,0 +1,57 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class BighornSheep : AnimalEntity + { + public BighornSheep(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class BighornSheepSpecies : AnimalSpecies + { + public BighornSheepSpecies() : base() + { + species = this; + this.InstanceType = typeof(BighornSheep); + + // Info + this.Name = "BighornSheep"; + this.DisplayName = Localizer.DoStr("BighornSheep"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() {typeof(DwarfWillow), typeof(PricklyPear), typeof(Agave), typeof(Sagebrush)}; + this.CalorieValue = 100f; + // Movement + this.Flying = false; + this.Swimming = false; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(BighornCarcassItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(HerdAnimalBrain); + this.WanderingSpeed = 1f; + this.Speed = 5.5f; + this.Health = 3.2f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 1f; + this.FleePlayers = true; + this.AttackRange = 1f; + this.HeadDistance = 0.9f; + this.TimeLayToStand = 2.5f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + } +} diff --git a/Mods/Organisms/Animal/Bison.cs b/Mods/Organisms/Animal/Bison.cs new file mode 100644 index 0000000..58691cb --- /dev/null +++ b/Mods/Organisms/Animal/Bison.cs @@ -0,0 +1,65 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.Organisms.Behaviors; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class Bison : AnimalEntity + { + public Bison(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class BisonSpecies : AnimalSpecies + { + public BisonSpecies() : base() + { + species = this; + this.InstanceType = typeof(Bison); + + // Info + this.Name = "Bison"; + this.DisplayName = Localizer.DoStr("Bison"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() { typeof(CommonGrass), typeof(Bunchgrass), typeof(Wheat), typeof(BigBluestem), typeof(Switchgrass) }; + this.CalorieValue = 500f; + // Movement + this.Flying = false; + this.Swimming = false; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(BisonCarcassItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(HerdAnimalBrain); + this.WanderingSpeed = 0.8f; + this.Speed = 4f; + this.Health = 7f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 0.6f; + this.FleePlayers = true; + this.AttackRange = 1f; + this.HeadDistance = 1f; + this.TimeLayToStand = 4f; + this.TimeStandToLay = 3f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + + public override void FleeFrom(Vector3 position) + { + base.FleeFrom(position); + GroupBehaviors.SyncFleePosition(this); + } + } +} diff --git a/Mods/Organisms/Animal/Deer.cs b/Mods/Organisms/Animal/Deer.cs new file mode 100644 index 0000000..f1d7b61 --- /dev/null +++ b/Mods/Organisms/Animal/Deer.cs @@ -0,0 +1,64 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.Organisms.Behaviors; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class Deer : AnimalEntity + { + public Deer(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class DeerSpecies : AnimalSpecies + { + public DeerSpecies() : base() + { + species = this; + this.InstanceType = typeof(Deer); + + // Info + this.Name = "Deer"; + this.DisplayName = Localizer.DoStr("Deer"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() {typeof(Huckleberry), typeof(Fern), typeof(Beans), typeof(Salal), typeof(Corn), typeof(Bunchgrass), typeof(Wheat)}; + this.CalorieValue = 200f; + // Movement + this.Flying = false; + this.Swimming = false; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(DeerCarcassItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(LandAnimalBrain); + this.WanderingSpeed = 1f; + this.Speed = 5.5f; + this.Health = 3.2f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 1f; + this.FleePlayers = true; + this.AttackRange = 1f; + this.HeadDistance = 1f; + this.TimeLayToStand = 2.5f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + + public override void FleeFrom(Vector3 position) + { + base.FleeFrom(position); + GroupBehaviors.SyncFleePosition(this); + } + } +} diff --git a/Mods/Organisms/Animal/Elk.cs b/Mods/Organisms/Animal/Elk.cs new file mode 100644 index 0000000..5cfa05e --- /dev/null +++ b/Mods/Organisms/Animal/Elk.cs @@ -0,0 +1,57 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class Elk : AnimalEntity + { + public Elk(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class ElkSpecies : AnimalSpecies + { + public ElkSpecies() : base() + { + species = this; + this.InstanceType = typeof(Elk); + + // Info + this.Name = "Elk"; + this.DisplayName = Localizer.DoStr("Elk"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() {typeof(Huckleberry), typeof(Fern), typeof(Beans), typeof(Salal)}; + this.CalorieValue = 200f; + // Movement + this.Flying = false; + this.Swimming = false; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(ElkCarcassItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(LandAnimalBrain); + this.WanderingSpeed = 1f; + this.Speed = 5.5f; + this.Health = 3.2f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 1f; + this.FleePlayers = true; + this.AttackRange = 1f; + this.HeadDistance = 1f; + this.TimeLayToStand = 2.5f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + } +} diff --git a/Mods/Organisms/Animal/Fox.cs b/Mods/Organisms/Animal/Fox.cs new file mode 100644 index 0000000..ca27fa0 --- /dev/null +++ b/Mods/Organisms/Animal/Fox.cs @@ -0,0 +1,56 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class Fox : AnimalEntity + { + public Fox(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class FoxSpecies : AnimalSpecies + { + public FoxSpecies() : base() + { + species = this; + this.InstanceType = typeof(Fox); + + // Info + this.Name = "Fox"; + this.DisplayName = Localizer.DoStr("Fox"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() {typeof(Hare), typeof(Turkey)}; + this.CalorieValue = 100f; + // Movement + this.Flying = false; + this.Swimming = false; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(FoxCarcassItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(LandPredatorBrain); + this.WanderingSpeed = 1.5f; + this.Speed = 5f; + this.Health = 2f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 0.9f; + this.FleePlayers = true; + this.AttackRange = 1f; + this.TimeLayToStand = 2.5f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + } +} diff --git a/Mods/Organisms/Animal/Hare.cs b/Mods/Organisms/Animal/Hare.cs new file mode 100644 index 0000000..679abc2 --- /dev/null +++ b/Mods/Organisms/Animal/Hare.cs @@ -0,0 +1,55 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class Hare : AnimalEntity + { + public Hare(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class HareSpecies : AnimalSpecies + { + public HareSpecies() : base() + { + species = this; + this.InstanceType = typeof(Hare); + + // Info + this.Name = "Hare"; + this.DisplayName = Localizer.DoStr("Hare"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() {typeof(Camas), typeof(Wheat), typeof(Bunchgrass), typeof(Sagebrush), typeof(Corn), typeof(Huckleberry), typeof(BigBluestem)}; + this.CalorieValue = 50f; + // Movement + this.Flying = false; + this.Swimming = false; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(HareCarcassItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(HerdAnimalBrain); + this.WanderingSpeed = 1f; + this.Speed = 5f; + this.Health = 1f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 0.8f; + this.FleePlayers = true; + this.AttackRange = 1f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + } +} diff --git a/Mods/Organisms/Animal/MountainGoat.cs b/Mods/Organisms/Animal/MountainGoat.cs new file mode 100644 index 0000000..aa75bfa --- /dev/null +++ b/Mods/Organisms/Animal/MountainGoat.cs @@ -0,0 +1,64 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.Organisms.Behaviors; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class MountainGoat : AnimalEntity + { + public MountainGoat(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class MountainGoatSpecies : AnimalSpecies + { + public MountainGoatSpecies() : base() + { + species = this; + this.InstanceType = typeof(MountainGoat); + + // Info + this.Name = "MountainGoat"; + this.DisplayName = Localizer.DoStr("MountainGoat"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() {typeof(PeatMoss), typeof(Saxifrage), typeof(Lupine), typeof(Fireweed), typeof(DwarfWillow), typeof(ArcticWillow)}; + this.CalorieValue = 100f; + // Movement + this.Flying = false; + this.Swimming = false; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(MountainGoatCarcassItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(HerdAnimalBrain); + this.WanderingSpeed = 1.2f; + this.Speed = 5.5f; + this.Health = 3.2f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 1f; + this.FleePlayers = true; + this.AttackRange = 1f; + this.HeadDistance = 0.75f; + this.TimeLayToStand = 2.5f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + + public override void FleeFrom(Vector3 position) + { + base.FleeFrom(position); + GroupBehaviors.SyncFleePosition(this); + } + } +} diff --git a/Mods/Organisms/Animal/Otter.cs b/Mods/Organisms/Animal/Otter.cs new file mode 100644 index 0000000..f32c100 --- /dev/null +++ b/Mods/Organisms/Animal/Otter.cs @@ -0,0 +1,140 @@ +namespace Eco.Mods.Organisms +{ + using System; + using System.Collections.Generic; + using Eco.Mods.Organisms.Behaviors; + using Eco.Gameplay.Animals; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Shared.States; + using Eco.Shared.Utils; + using Eco.Simulation.Agents; + using Eco.Simulation.Agents.AI; + using Eco.Simulation.Types; + using Eco.Simulation.WorldLayers; + using Eco.Mods.TechTree; + + public class Otter : AnimalEntity + { + public Otter(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class OtterSpecies : AnimalSpecies + { + public OtterSpecies() : base() + { + species = this; + this.InstanceType = typeof(Otter); + + // Info + this.Name = "Otter"; + this.DisplayName = Localizer.DoStr("Otter"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() {typeof(Clam), typeof(Urchin), typeof(Tuna), typeof(Salmon), typeof(Trout)}; + this.CalorieValue = 50f; + // Movement + this.Flying = false; + this.Swimming = true; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(OtterCarcassItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(Brain); + this.WanderingSpeed = 1f; + this.Speed = 2f; + this.Health = 1f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 1f; + this.FleePlayers = true; + this.AttackRange = 1f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + + // Otters can spawn on land or water + public override bool IsValidSpawnPosition(Vector3i pos) { return true; } + } + + // Otter specific behavior + private bool floating; + private class BT : FunctionalBehaviorTree { } + public static readonly Func OtterTreeRoot; + public static readonly Func OtterLandTree; + public static readonly Func OtterFloatingTree; + public static readonly Func OtterDivingTree; + static Otter() + { + const float MinIdleTime = 3f; + const float MaxIdleTime = 10f; + const float MinFloatIdleTime = 10f; + const float MaxFloatIdleTime = 20f; + const float ChanceToIdle = 0.3f; + const float ChanceToSurface = 0.3f; + const float ChanceToDive = 0.1f; + const float TimeToStopFloating = 2f; + const float DiveAlertness = 200; + const float MaxHeightAboveSeaLevel = 5; + + OtterLandTree = + BT.If(x => !World.World.IsUnderwater(x.Position.WorldPosition3i), + BT.Selector( + MovementBehaviors.AmphibiousFlee, + BT.If(x => RandomUtil.Chance(ChanceToIdle), + Brain.PlayAnimation(AnimalAnimationState.Idle, _ => RandomUtil.Range(MinIdleTime, MaxIdleTime))), + BT.If(x => x.Position.y > WorldLayerManager.ClimateSim.State.SeaLevel + MaxHeightAboveSeaLevel, + x => MovementBehaviors.RouteToWater(x, x.Species.WanderingSpeed, AnimalAnimationState.Wander)), + BT.If(MovementBehaviors.ShouldReturnHome, + MovementBehaviors.AmphibiousWanderHome), + MovementBehaviors.AmphibiousWander)); + + OtterFloatingTree = + BT.If(x => x.floating, + BT.Selector( + BT.If(x => x.AnimationState == AnimalAnimationState.FloatingIdle, + // floating otters need time to flip back over before doing other things + Brain.PlayFixedTimeAnimation(AnimalAnimationState.SurfaceSwimming, TimeToStopFloating)), + BT.If(x => x.Alertness > DiveAlertness, + // dive when scared + BT.Success(x => x.floating = false), + BT.Selector(MovementBehaviors.SwimFlee, MovementBehaviors.SwimWander)), + MovementBehaviors.AmphibiousFlee, + BT.If(x => RandomUtil.Chance(ChanceToDive), + BT.Success(x => x.floating = false), + MovementBehaviors.SwimWander), + BT.If(MovementBehaviors.ShouldReturnHome, + MovementBehaviors.AmphibiousWanderHome), + BT.If(x => RandomUtil.Chance(ChanceToIdle), + Brain.PlayAnimation(AnimalAnimationState.FloatingIdle, _ => RandomUtil.Range(MinFloatIdleTime, MaxFloatIdleTime))), + MovementBehaviors.AmphibiousWander)); + + OtterDivingTree = + BT.Selector( + MovementBehaviors.SwimFlee, + BT.If(MovementBehaviors.ShouldReturnHome, + BT.Success(x => x.floating = true), + MovementBehaviors.SwimWanderHomeSurface), + BT.If(x => x.Alertness < DiveAlertness && RandomUtil.Chance(ChanceToSurface), + BT.Success(x => x.floating = true), + MovementBehaviors.SwimWanderSurface), + BT.If(x => RandomUtil.Chance(1 - ChanceToIdle), + MovementBehaviors.SwimWander), + Brain.PlayAnimation(AnimalAnimationState.SwimmingIdle, _ => RandomUtil.Range(MinIdleTime, MaxIdleTime))); + + OtterTreeRoot = + BT.Selector( + OtterLandTree, + // TODO: dive for food & eat on surface (need tummy eating animation) + OtterFloatingTree, + OtterDivingTree + ); + + Brain.SharedBehavior = OtterTreeRoot; + } + } +} diff --git a/Mods/Organisms/Animal/Salmon.cs b/Mods/Organisms/Animal/Salmon.cs new file mode 100644 index 0000000..c0547b0 --- /dev/null +++ b/Mods/Organisms/Animal/Salmon.cs @@ -0,0 +1,55 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class Salmon : AnimalEntity + { + public Salmon(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class SalmonSpecies : AnimalSpecies + { + public SalmonSpecies() : base() + { + species = this; + this.InstanceType = typeof(Salmon); + + // Info + this.Name = "Salmon"; + this.DisplayName = Localizer.DoStr("Salmon"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() {typeof(Waterweed)}; + this.CalorieValue = 50f; + // Movement + this.Flying = false; + this.Swimming = true; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(SalmonItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(FishBrain); + this.WanderingSpeed = 1f; + this.Speed = 2f; + this.Health = 1f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 1f; + this.FleePlayers = true; + this.AttackRange = 1f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + } +} diff --git a/Mods/Organisms/Animal/Tortoise.cs b/Mods/Organisms/Animal/Tortoise.cs new file mode 100644 index 0000000..eac2b1e --- /dev/null +++ b/Mods/Organisms/Animal/Tortoise.cs @@ -0,0 +1,85 @@ +namespace Eco.Mods.Organisms +{ + using System; + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Gameplay.Interactions; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Shared.Networking; + using Eco.Shared.States; + using Eco.Shared.Utils; + using Eco.Simulation.Agents; + using Eco.Simulation.Agents.AI; + using Eco.Simulation.Types; + + public class Tortoise : AnimalEntity + { + public Tortoise(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class TortoiseSpecies : AnimalSpecies + { + public TortoiseSpecies() : base() + { + species = this; + this.InstanceType = typeof(Tortoise); + + // Info + this.Name = "Tortoise"; + this.DisplayName = Localizer.DoStr("Tortoise"); + // Lifetime + this.MaturityAgeDays = 2f; + // Food + this.FoodSources = new List() { typeof(Sagebrush), typeof(CreosoteBush), typeof(PricklyPear), typeof(Agave) }; + this.CalorieValue = 10f; + // Movement + this.Flying = false; + this.Swimming = false; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(RawMeatItem), new Range(1f, 2f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(Brain); + this.WanderingSpeed = 0.1f; + this.Speed = 0.2f; + this.Health = 1f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 1f; + this.FleePlayers = true; + this.AttackRange = 1f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + + // tortoise behavior + private class BT : FunctionalBehaviorTree { } + public static readonly Func TortoiseTreeRoot; + static Tortoise() + { + const float MinHidingTime = 5f; + const float MaxHidingTime = 10f; + + TortoiseTreeRoot = + BT.Selector( + // Tortoise hide instead of fleeing, fixed time to block pointless flee interruptions + BT.If(x => x.Alertness > Animal.FleeThreshold, + Brain.PlayFixedTimeAnimation(AnimalAnimationState.Hiding, _ => RandomUtil.Range(MinHidingTime, MaxHidingTime))), + LandAnimalBrain.LandAnimalTreeRoot); + + Brain.SharedBehavior = TortoiseTreeRoot; + } + + public override bool TryApplyDamage(INetObject damager, float damage, InteractionContext context, Type damageDealer = null) + { + // turtle power! (or uhh tortoise power!) + return base.TryApplyDamage(damager, this.AnimationState == AnimalAnimationState.Hiding ? damage / 4 : damage, context, damageDealer); + } + } +} diff --git a/Mods/Organisms/Animal/Trout.cs b/Mods/Organisms/Animal/Trout.cs new file mode 100644 index 0000000..4db7cba --- /dev/null +++ b/Mods/Organisms/Animal/Trout.cs @@ -0,0 +1,55 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class Trout : AnimalEntity + { + public Trout(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class TroutSpecies : AnimalSpecies + { + public TroutSpecies() : base() + { + species = this; + this.InstanceType = typeof(Trout); + + // Info + this.Name = "Trout"; + this.DisplayName = Localizer.DoStr("Trout"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() {typeof(Waterweed)}; + this.CalorieValue = 25f; + // Movement + this.Flying = false; + this.Swimming = true; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(TroutItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(FishBrain); + this.WanderingSpeed = 1f; + this.Speed = 2f; + this.Health = 1f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 1f; + this.FleePlayers = true; + this.AttackRange = 1f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + } +} diff --git a/Mods/Organisms/Animal/Tuna.cs b/Mods/Organisms/Animal/Tuna.cs new file mode 100644 index 0000000..289f29a --- /dev/null +++ b/Mods/Organisms/Animal/Tuna.cs @@ -0,0 +1,55 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class Tuna : AnimalEntity + { + public Tuna(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class TunaSpecies : AnimalSpecies + { + public TunaSpecies() : base() + { + species = this; + this.InstanceType = typeof(Tuna); + + // Info + this.Name = "Tuna"; + this.DisplayName = Localizer.DoStr("Tuna"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() { typeof(Kelp), typeof(Seagrass) }; + this.CalorieValue = 100f; + // Movement + this.Flying = false; + this.Swimming = true; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(TunaItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(FishBrain); + this.WanderingSpeed = 1f; + this.Speed = 2f; + this.Health = 1f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 1f; + this.FleePlayers = true; + this.AttackRange = 1f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + } +} diff --git a/Mods/Organisms/Animal/Turkey.cs b/Mods/Organisms/Animal/Turkey.cs new file mode 100644 index 0000000..520576d --- /dev/null +++ b/Mods/Organisms/Animal/Turkey.cs @@ -0,0 +1,56 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Types; + + public class Turkey : AnimalEntity + { + public Turkey(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class TurkeySpecies : AnimalSpecies + { + public TurkeySpecies() : base() + { + species = this; + this.InstanceType = typeof(Turkey); + + // Info + this.Name = "Turkey"; + this.DisplayName = Localizer.DoStr("Turkey"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() { typeof(Bunchgrass), typeof(Camas) }; + this.CalorieValue = 75f; + // Movement + this.Flying = false; + this.Swimming = false; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(TurkeyCarcassItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(LandAnimalBrain); + this.WanderingSpeed = 1f; + this.Speed = 3.5f; + this.Health = 1.8f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 0.5f; + this.FleePlayers = true; + this.AttackRange = 1f; + this.TimeLayToStand = 3.5f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + } +} diff --git a/Mods/Organisms/Animal/Wolf.cs b/Mods/Organisms/Animal/Wolf.cs new file mode 100644 index 0000000..8e537d9 --- /dev/null +++ b/Mods/Organisms/Animal/Wolf.cs @@ -0,0 +1,60 @@ +namespace Eco.Mods.Organisms +{ + using System.Collections.Generic; + using Eco.Gameplay.Animals; + using Eco.Mods.TechTree; + using Eco.Shared.Localization; + using Eco.Shared.Math; + using Eco.Simulation.Agents; + using Eco.Simulation.Time; + using Eco.Simulation.Types; + + public class Wolf : AnimalEntity + { + public Wolf(Animal parent, Vector3 pos, bool corpse = false) : base(parent, pos, species, corpse) { } + static AnimalSpecies species; + public class WolfSpecies : AnimalSpecies + { + public WolfSpecies() : base() + { + species = this; + this.InstanceType = typeof(Wolf); + + // Info + this.Name = "Wolf"; + this.DisplayName = Localizer.DoStr("Wolf"); + // Lifetime + this.MaturityAgeDays = 1f; + // Food + this.FoodSources = new List() {typeof(Hare), typeof(Elk), typeof(MountainGoat), typeof(Deer)}; + this.CalorieValue = 100f; + // Movement + this.Flying = false; + this.Swimming = false; + // Resources + this.ResourceList = new List() + { + new SpeciesResource(typeof(WolfCarcassItem), new Range(1f, 1f)), + }; + this.ResourceBonusAtGrowth = 0.9f; + // Behavior + this.BrainType = typeof(LandPredatorBrain); + this.WanderingSpeed = 0.7f; + this.Speed = 5.5f; + this.Health = 1.5f; + this.Damage = 1f; + this.DelayBetweenAttacksRangeSec = new Range(0.8f, 2.5f); + this.FearFactor = 0.5f; + this.FleePlayers = true; + this.AttackRange = 1f; + this.HeadDistance = 0.8f; + this.TimeLayToStand = 4f; + // Climate + this.ReleasesCO2ppmPerDay = 0f; + + } + } + + public override bool ShouldSleep { get { return !WorldTime.IsNight(); } } + } +}