Skip to main content

RandomPooledObjectDefinition.PooledObjectElement

A private class in Root.Township, the global namespace. Reach it through att-stubs' publicized assemblies or Harmony's AccessTools.

One weighted choice in a RandomPooledObjectDefinition. Note the parent's pick casts Random.value to int before scaling, so in practice it nearly always returns the first entry.

Constructors​

MemberWhat it is
PooledObjectElement()Creates a RandomPooledObjectDefinition.PooledObjectElement with default values.

Fields​

2 private and internal fields
MemberWhat it is
private PooledObjectDefinition definitionBacking field for Definition.
private int weightBacking field for Weight.

Properties​

MemberWhat it is
PooledObjectDefinition Definition { get; }The pooled object definition this entry spawns.
int Weight { get; }Relative chance of this entry being picked.

Used in​

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