Show / Hide Table of Contents

Class PlantInteraction<TIntermediateDescription>

Base class for Plant interactions. Contains common methods.

Inheritance
System.Object
WorldLayerInteraction<TIntermediateDescription>
PlantInteraction<TIntermediateDescription>
PlantYield
ProducerSpeciesGrowth
Implements
IWorldLayerInteraction
IWorldLayerRelationship
Inherited Members
WorldLayerInteraction<TIntermediateDescription>.Verify(List<LocString>)
WorldLayerInteraction<TIntermediateDescription>.Apply(Single, Single[], WorldLayerNeighborInfo[])
WorldLayerInteraction<TIntermediateDescription>.PostWorldgen(Single, Single[], WorldLayerNeighborInfo[])
WorldLayerInteraction<TIntermediateDescription>.DescribeParameterized(WorldArea)
WorldLayerInteraction<TIntermediateDescription>.DescribeSpecific(Single, Single[], WorldLayerNeighborInfo[])
WorldLayerInteraction<TIntermediateDescription>.DescribeAggregated(IEnumerable<TIntermediateDescription>)
WorldLayerInteraction<TIntermediateDescription>.GetDependencyIndexByLayerName(String)
WorldLayerInteraction<TIntermediateDescription>.ValueOf(String, Single[])
WorldLayerInteraction<TIntermediateDescription>.PostWorldgenValueOf(String, Single[])
WorldLayerInteraction<TIntermediateDescription>.ToString()
WorldLayerInteraction<TIntermediateDescription>.RequiresNeighborhood
WorldLayerInteraction<TIntermediateDescription>.DependencyLayerNames
WorldLayerInteraction<TIntermediateDescription>.Dependencies
WorldLayerInteraction<TIntermediateDescription>.WorldInitDependencyLayerNames
WorldLayerInteraction<TIntermediateDescription>.PostWorldgenDependencies
WorldLayerInteraction<TIntermediateDescription>.OutputLayerName
WorldLayerInteraction<TIntermediateDescription>.OutputLayer
WorldLayerInteraction<TIntermediateDescription>.DescribeGeneral
Namespace: Eco.Simulation.WorldLayers.LayerInteractions
Assembly: Eco.Simulation.dll
Syntax
public abstract class PlantInteraction<TIntermediateDescription> : WorldLayerInteraction<TIntermediateDescription>, IWorldLayerInteraction, IWorldLayerRelationship
Type Parameters
Name Description
TIntermediateDescription

Constructors

PlantInteraction(PlantSpecies)

Declaration
protected PlantInteraction(PlantSpecies species)
Parameters
Type Name Description
PlantSpecies species

Fields

Species

Declaration
protected readonly PlantSpecies Species
Field Value
Type Description
PlantSpecies

Methods

ApplyCapacityConstraints(ref Single, ref String, Single[])

Applies capacity constraints to availablePopulationExtension. It uses two layers {Plant}Capacity and {Plant}ConsumedCapacity for calculation. For every plant there may be few capacity constraints like required fertile ground per plant and required canopy space per plant. Then it calculates how plants may be planted in available capacity (total - consumed) and reduces availablePopulationExtension if it is greater than the value. After applying these constraints it ensures that layer value is capped by all capacities (can't be increased more than for updated availablePopulationExtension).

Declaration
protected void ApplyCapacityConstraints(ref float availablePopulationExtension, ref string layerName, float[] dependencyValues)
Parameters
Type Name Description
System.Single availablePopulationExtension

Currently available population extension.

System.String layerName

Restricting layer name if any layer reduced limit.

System.Single[] dependencyValues

Dependency values for calculations.

ApplyResourceConstraints(ref Single, ref String, Single[])

Applies resource limit to current limit modifier.

Declaration
protected void ApplyResourceConstraints(ref float habitability, ref string layerName, float[] dependencyValues)
Parameters
Type Name Description
System.Single habitability

Current limit modifier [0; 1]. May be reduced if restricted by resources.

System.String layerName

Restricting layer name if any layer reduced limit.

System.Single[] dependencyValues

Dependency values for calculations.

EnvironmentHabitability(Single[])

Declaration
protected float EnvironmentHabitability(float[] dependencyValues)
Parameters
Type Name Description
System.Single[] dependencyValues
Returns
Type Description
System.Single

Implements

IWorldLayerInteraction
IWorldLayerRelationship
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾