Skip to main content

LootHelper

A static class in Root.Township, Alta.Loot.

Static helper that fills a set of pickup docks with random loot for a biome and prosperity. Server side; used by GeneratedLoot and LootModule.

Methods​

MemberWhat it is
static bool Spawn(SpawnData spawnData, IEnumerable<PickupDock> targets, float incrementingFailChance)Empties the docks, then picks random empty docks and spawns loot from the biome's loot tables until all are filled or a growing fail chance stops it. Returns true if anything spawned.
2 private and internal methods
MemberWhat it is
private static void HandleFail(Pickup pickup, PickupDock dock)Moves a pickup that failed to dock to the dock's position and destroys it.
private static bool Spawn(Item item, PickupDock dock, INetworkScene scene, SpawnData spawnData, int count)Empties the docks, then picks random empty docks and spawns loot from the biome's loot tables until all are filled or a growing fail chance stops it. Returns true if anything spawned.