Skip to main content

PresetLootSet.Entry

A class in Root.Township, Alta.Loot.

One line in a preset loot set: what item to spawn, how many, and on which material.

Constructors​

MemberWhat it is
Entry()Creates a PresetLootSet.Entry with default values.

Fields​

8 private and internal fields
MemberWhat it is
private float baseCountHow many spawn before prosperity and random changes.
private ObjectPipeline itemPipeline that picks the item.
private int minimumDocksBacking field for MinimumDocks.
private ObjectPipeline physicalMaterialPipeline that picks the physical material, if set.
private float prosperityMultiplierExtra count per point of the spawn's prosperity attribute.
private float randomCountRatioUp to this fraction of the count is randomly removed.
private int roundsBacking field for Rounds.
private SpawnData tempThe spawn data of the current spawn, kept for CheckMaterial.

Properties​

MemberWhat it is
int MinimumDocks { get; }The group must have at least this many docks for the entry to spawn.
int Rounds { get; }How many times the entry tries to spawn, each into another dock.

Methods​

MemberWhat it is
bool SpawnInto(SpawnData spawnData, PickupDock dock)Spawns the item into a dock: base count plus prosperity bonus, minus a random part, rounded up. False if nothing spawned.
1 private and internal method
MemberWhat it is
private void CheckMaterial(Pickup pickup)Sets the spawned pickup's physical material, if this entry has one.

Used in​

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