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
| Member | What it is |
|---|
PresetLootModule() | Unity makes components itself; use AddComponent or spawn a prefab instead of new. |
Fields
3 private and internal fields
| Member | What it is |
|---|
private PickupDockGroup group | Backing field for Group. |
private static Logger logger | NLog logger; logs an error when the preset set is missing. |
private PresetLootModuleSaveData setup | The saved settings: which PresetLootSet to use and whether to clear the group first. Saved and loaded as is. |
Properties
Methods
| Member | What 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
| Member | What 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. |