CosmeticPackScheduler
A class in Root.Township, Alta.Customization.
Queue that runs character cosmetic packing one CosmeticPacker at a time. Client side; use the static Instance.
- Listed in Customization and screenshots
Constructors
| Member | What it is |
|---|---|
CosmeticPackScheduler() | Creates a CosmeticPackScheduler with default values. |
Fields
7 private and internal fields
| Member | What it is |
|---|---|
private CancellationTokenSource cancelCurrent | Cancellation source for the pack in progress. |
private CosmeticPacker current | The packer being packed now, or null when idle. |
private HashSet<CosmeticPacker> inQueue | Set of queued packers, used to skip duplicates and cancelled entries. |
private static Logger logger | NLog logger for this class. |
private AddressableSession packSession | Addressable session shared by all packs in one run of the queue; disposed when the queue empties. |
private IPlatformDevice platformDevice | Platform device service, used to switch the CharacterPaking FFV source while packing. |
private Queue<CosmeticPacker> queue | Packers waiting to be packed, in order. |
Properties
| Member | What it is |
|---|---|
static CosmeticPackScheduler Instance { get; } | The single shared scheduler. |
Methods
| Member | What it is |
|---|---|
void Cancel(CosmeticPacker packer) | Cancels the packer if it is packing now, or drops it from the queue. |
void Enqueue(CosmeticPacker packer) | Queues a packer. If that packer is already packing, its current pack is cancelled and it is queued again. |