ForestConnectivityIncreaser
A class in Root.Township, Alta.Forests.
Forest node map step that opens some blocked edges into normal paths, to add loops between nodes of similar height.
Constructors
| Member | What it is |
|---|
ForestConnectivityIncreaser() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
5 private and internal fields
| Member | What it is |
|---|
private BiomeAttribute cutChance | Biome attribute for the chance an edge is opened, summed from both nodes. |
private AnimationCurve heightChanceMultiplier | Scales the chance by height difference over maxHeightDifference. |
private int iterations | Number of passes over the edges. |
private int maxCutDistance | Nodes must already be within this many path steps of each other. |
private float maxHeightDifference | Edges with a bigger height difference are never opened. |
Methods
| Member | What it is |
|---|
override void Modify(ForestGeneration forest) | Over several passes, turns blocked edges between non-entrance nodes into normal edges by chance, if the nodes are close in height and already near on the path graph. |