Skip to main content

CustomizationSlot

A class in Root.Township, Alta.Customization.

One body slot in a character's customisation, tracking which cosmetic parts are in it and which one is visible. Other entries in the slot are marked impeded (shown in their reduced form). Created by CustomizationVisualManager.

Constructors​

MemberWhat it is
CustomizationSlot(IEnumerable<ICustomizationHandler> handlers)Creates a CustomizationSlot from handlers.

Fields​

5 private and internal fields
MemberWhat it is
private int disableCountNumber of outstanding Disable calls.
private List<CustomizationSlotEntry> entriesEvery entry in the slot, oldest first.
private IEnumerable<ICustomizationHandler> handlersCustomisation handlers (for example the character dummy) that entries are applied to.
private bool isVisiblePrimaryWhether the visible visual is a primary for this slot, which makes new visuals impeded instead.
private List<CustomizationSlotEntry> visibleEntries currently shown unimpeded, all from the same visual.

Properties​

MemberWhat it is
bool IsDisabled { get; }True while at least one Disable is not matched by Undisable.

Methods​

MemberWhat it is
void Add(CustomizationSlotEntry entry)Adds a part to the slot. If another visual already shows there, the new or old entries become impeded depending on which is primary.
void Disable()Adds a disabler to the slot and to every entry in it. Calls stack.
void Remove(CustomizationSlotEntry entry)Removes a part and picks a new visible visual if it was the shown one.
void Undisable()Removes one disabler; when none are left, the entries are re-enabled.
1 private and internal method
MemberWhat it is
private void EvaluateNewVisible(ICustomizationVisual oldVisual)After the visible entry is removed, makes the most recent other visual's entries visible and un-impedes them.

Used in​

Members of other types that take, return or hold a CustomizationSlot: