Skip to main content

PresetLootModule

A class in Root.Township, Alta.Loot.

Fills the parent PickupDockGroup with a fixed PresetLootSet instead of random loot. Server side; the set and options come from its saved setup.

Constructors​

MemberWhat it is
PresetLootModule()Unity makes components itself; use AddComponent or spawn a prefab instead of new.

Fields​

3 private and internal fields
MemberWhat it is
private PickupDockGroup groupBacking field for Group.
private static Logger loggerNLog logger; logs an error when the preset set is missing.
private PresetLootModuleSaveData setupThe saved settings: which PresetLootSet to use and whether to clear the group first. Saved and loaded as is.

Properties​

MemberWhat it is
PickupDockGroup Group { get; }The PickupDockGroup in the parents, found on first access.

Methods​

MemberWhat it is
void Spawn()Spawns the preset set into the group now, or waits until the entity is added to a chunk. No code callers; probably hooked up from a Unity event.
1 private and internal method
MemberWhat it is
private void HasChunk(Chunk chunk = null)Runs the spawn once the entity has a chunk, using the chunk's spawn data. Clears the group first if clearWhenSpawn is set.