This is an old revision of the document!
Apparel in SmutBook is defined as anything that a Person can wear. This includes clothing, jewelry, and perhaps even naughty toys in some cases.
The Apparel system also provides the Wardrobe and WornApparel classes, which are special subclasses of GeneralInventory that only deal with Apparel. Wardrobe is a lightly modified GeneralInventory that modifies the sorting implementation to make it more clothing-specific (although it can still contain any PersistentObject, non Apparel objects will all be lumped into the “Other” category). WornApparel is used by the Person classes to track what a Person is wearing, and enforces the rule of only one article of apparel per ClothingSlot (see below).
In general, you may use a Wardrobe interchangeably with a GeneralInventory when using the InventoryUI macro. For the wearing and removing of Apparel by a Person, however, a modified version (ApparelUI) is provided. The left-hand inventory provided to ApparelUI should always be a Person (not a WornApparel, but the higher-level Person object that is dressing/undressing). The right-hand inventory should always be a Wardrobe. This isn't *technically* true, but the sorting will be fked up; but we need to make it Work Better, as I can see use-cases where a person might want to dress out of a backpack in a bathroom stall, or somesuch.
: Document how WornApparel and Wardrobe interact as far as items technically remaining in the Wardrobe while they are worn by a Person.
Stuff that is changing:
A Person should have some statistics that are calculated based on their Transformables (although we may have an innate base-value attached to the Person themselves that also figures into it):
Each Apparel will be of one or more ClothingTypes. Only one of each ClothingType may be worn at a time. Additionally, a ClothingType may define other ClothingTypes that conflict with it. This would allow us to, for example, make a dress conflict with pants and shirt. These will just be a string (we ought to make it case-insensitive just to make things easier on the library user), and we'll want to implement an easy way to implement new ClothingTypes and to add new conflicting ClothingTypes to existing ClothingTypes.
ClothingType occupies one or more Layers. Usually only one, but if we want to implement a whole costume as one item, for example, we may want to make it use several layers. In fact, we should combine the implementation of this and BodySlot into a list of (layer,bodyslot) pairs.
A particular article of clothing occupies one or more BodySlots (used used in conjunction with Layers to figure out what covers what):
Each (layer,bodyslot) will specify a (coverage,thickness).
Things we have to be able to handle:
Finish transcribing this from notes before implementation.