Distribution<TThis, T, TItem, TFestivityGroup>.BaseItem
A class in Root.Township, Alta.Caves.
One weighted entry in a distribution: the result object and how its weight changes with biome attributes.
- Listed in World generation
- Nested in
Distribution<TThis, T, TItem, TFestivityGroup> - Inherits or implements
IDistributionItem<T> - Derived types
Distribution.Item,GameObjectDistribution.Item
Constructors
| Member | What it is |
|---|---|
BaseItem() | Creates a Distribution with default values. |
Fields
4 private and internal fields
| Member | What it is |
|---|---|
private float baseValue | Starting weight when attributes are given. |
private AttributeCurveRange[] multipliers | Attribute curves that scale the weight by attribute value. |
private float noAttributeValue | Weight used when no attribute set is passed. |
private T topic | Backing field for Topic. |
Properties
| Member | What it is |
|---|---|
T Topic { get; } | The object this entry returns when picked. |
Methods
| Member | What it is |
|---|---|
float GetValue(AttributeSet attributes = null) | Weight of this entry: noAttributeValue with no attributes, otherwise baseValue times the topic's own evaluation (if it is an IDistributionValue) and each attribute multiplier, never below 0. |
void Migrate<TThisOther, TOther, TItemOther, TFestivityGroupOther>(TItemOther other, Func<TOther, T> convert) | Copies weights and multipliers from another item type, converting the topic. |