A class in Root.Township, Alta.Loot.
A loot table asset: item entries grouped by rarity, with extra entries for festivals. GetLoot rolls an item for a dock.
Constructors
| Member | What it is |
|---|
LootTable() | Use ScriptableObject.CreateInstance instead of new; Unity loads the saved ones from assets. |
Fields
4 private and internal fields
| Member | What it is |
|---|
private List<LootTable.RarityList> entries | Item entries grouped by rarity, with optional festival-only entries. Exposed as Entries. |
private static List<Origin> triedOrigins | Origins already tried for the current rarity in GetLoot. |
private static List<Rarity> triedRarities | Rarities already tried in GetLoot. |
private static List<LootTable.Entry> workingList | Shared list of candidate entries filled while picking loot. |
Properties
Methods
| Member | What it is |
|---|
static Item GetLoot(PickupDock dock, LootTable[] localTables, float weightingPower, out int count) | Rolls a rarity, then an origin, then a category and an item for a dock. Returns the item and count, or null. The count never reaches Maximum unless it equals Minimum. |
static Item GetLoot(PickupDock dock, LootTable[] localTables, float weightingPower, out int count, out Rarity rarity, out Origin origin) | Rolls a rarity, then an origin, then a category and an item for a dock. Returns the item and count, or null. The count never reaches Maximum unless it equals Minimum. |
Used in
Members of other types that take, return or hold a LootTable: