Skip to main content

Ecosystem.PopulationApplication

A class in Root.Township, Alta.Populations.

One population entry in an Ecosystem asset: which population, how big it can get, and whether spawn points cap it. Server: turned into a PopulationSample per chunk.

Constructors​

MemberWhat it is
PopulationApplication()Creates an Ecosystem.PopulationApplication with default values.

Fields​

6 private and internal fields
MemberWhat it is
private int averageMaximumPopulationMaximum population before biome attribute impacts are applied (default 5). Ignored when limited by spawn points.
private PopulationDefinition definitionBacking field for Definition.
private bool isLimitedBySpawnPointsWhen set, the maximum and starting population both equal the spawn area limit instead of the average.
private float maxPopulationMultiplierOnSimpleServersScales the maximum on simple servers. Not applied when limited by spawn points.
private int minimumStartPopulationLowest starting count; the start is a random value between this and the maximum.
private Plugin pluginBacking field for Plugin.

Properties​

MemberWhat it is
PopulationDefinition Definition { get; }The population this entry spawns.
uint Hash { get; }Hash of the population definition, used to look up its spawn information.
Plugin Plugin { get; }Generation plugin tied to this entry.

Methods​

MemberWhat it is
PopulationSample InitializeSample(GeneratedBiome biome, Ecosystem ecosystem, PopulationFolderBase parent)Works out the maximum (from biome attributes and server type, or from spawn points) and a random starting count, and makes a PopulationSample.

Used in​

Members of other types that take, return or hold a PopulationApplication: