Vixen
c7401864
csharp
public sealed class Wardrobe

One character's presentation: what their gear is shown as, what is hidden, and their title.

Read the guide page for this →

Remarks

Per character, where the collection behind it is per account. That split is the one thing doc 28's paragraph does not say and every game needs: unlocks are account-wide, but two alts have different transmog and different titles out of the same wardrobe.

⚠ An override to something no longer unlocked resolves to the real item, never to nothing. An appearance can be taken back — a refund, a season ending, a patch — and the character wearing it must not turn invisible. That is why Resolve checks the unlock every single time instead of being told when one goes away: there is no notification to miss.

⚠ Hiding a slot and overriding it are separate, and hiding wins. "No helmet" and "a different helmet" are different wishes. A game that models hiding as an override to nothing loses the player's chosen look the moment they tick the box, and cannot give it back when they untick it.

Doc 28 calls transmog "one field and one visual-resolution rule". The field is per slot and lives here rather than on the item, because a sixteen-byte ItemInstance cannot hold variable-size per-copy data — which is the amendment doc 28 already records under Items, alongside the gem list and the custom name.

Fields and properties (6)

  • public CollectionRecord Record

    The account's collection.

  • public int Count

    How many slots are overridden.

  • public int Hiding

    How many are hidden.

  • public DefId Title

    What is written after their name, or None.

  • public IEnumerable<KeyValuePair<GameplayTag, DefId>> Overrides

    Every slot that is overridden, in tag order.

  • public IEnumerable<GameplayTag> Hidden

    Every hidden slot, in tag order.

Methods (11)

  • public Wardrobe(CollectionRecord record)

    Makes an empty wardrobe over a collection.

  • public bool Show(Collectible appearance)

    Shows one slot as something else.

  • public bool Seat(GameplayTag slot, DefId appearance)

    Puts a slot's override back with no checks at all.

  • public void SeatTitle(DefId title)

    Puts the worn title back without asking whether they still have it.

  • public bool Restore(GameplayTag slot)

    Stops showing one slot as something else.

  • public DefId OverrideOf(GameplayTag slot)

    What a slot is overridden with, or None.

  • public bool Hide(GameplayTag slot, bool hide = true)

    Hides or unhides a slot.

  • public bool IsHidden(GameplayTag slot)

    Whether a slot is hidden.

  • public DefId Resolve(GameplayTag slot, DefId worn)

    Works out what to draw in a slot.

  • public bool Wear(Collectible? title)

    Puts a title after their name.

  • public DefId Worn()

    What is written after their name, checked against the collection as it is now.

Used by (3)

  • CollectionTestsVixen.Gameplay.Collections.Tests
  • WardrobeSectionVixen.Live.Gameplay
  • WardrobeSectionTestsVixen.Live.Gameplay.Tests