CustomizationVisualManager
A class in Root.Township, Alta.Customization.
Tracks which cosmetic items are on a character, which slots they fill or disable, and attaches their visual parts to every registered handler (character dummy).
- Listed in Customization and screenshots
- Inherits or implements
ICustomizationVisualManager
Constructors
| Member | What it is |
|---|---|
CustomizationVisualManager() | Creates a CustomizationVisualManager with default values. |
Fields
5 private and internal fields
| Member | What it is |
|---|---|
private readonly HashSet<ICustomizationHandler> handlers | Backing set for Handlers. |
private readonly HashSet<int> hiddenSlots | Slot keys marked hidden; only cleared here. |
private readonly Dictionary<uint, List<CustomizationSlotEntry>> items | Slot entries per registered item hash. Entry 0 is the item itself, the rest are its parts. |
private static readonly Logger logger | NLog logger for this class. |
private readonly Dictionary<int, CustomizationSlot> slots | Slots by key. |
Properties
| Member | What it is |
|---|---|
IEnumerable<ICustomizationHandler> Handlers { get; } | The handlers that show this character's cosmetics. |
bool IsPaused { get; set; } | When true, handlers added by Attach keep their packer paused. |
Methods
| Member | What it is |
|---|---|
void ApplyArguments(uint item, CustomizationArguments[] arguments) | Pushes new arguments (colours and so on) for an item's parts to all handlers. |
void Attach(ICustomizationHandler handler) | Adds a handler and attaches every registered item's parts to it, pausing its packer meanwhile unless IsPaused. |
void Clear() | Clears every handler's packer inputs and forgets all slots and items. |
void Deregister(ICustomizationDefinition item) | Removes an item: detaches its parts from all handlers and releases its slots. |
void Detach(ICustomizationHandler handler) | Removes a handler and detaches all item parts from it, unless the handler is already destroyed. |
bool IsSlotDisabled(int key) | Whether a slot is disabled by some registered item. |
void Register(ICustomizationDefinition item, CustomizationArguments[] arguments) | Adds an item with its arguments: disables its blocked slots, fills its slots and attaches its parts to all handlers. Ignored if already registered. |
void UpdateFirstPerson(ICustomizationHandler handler) | Updates first-person visibility of every item part for one handler. |
1 private and internal method
| Member | What it is |
|---|---|
private CustomizationSlot GetOrAddSlot(int key) | Returns the slot for a key, creating it if missing. |