This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
libecho:classes:apparel [2022/05/22 14:33] – lee | libecho:classes:apparel [2023/08/09 18:42] (current) – removed lee | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== LibEcho.Apparel ====== | ||
- | |||
- | Apparel in LibEcho 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. | ||
- | |||
- | In general, you may use a Wardrobe interchangeably with a GeneralInventory when using the InventoryUI macro. | ||
- | |||
- | FIXME: Document how WornApparel and Wardrobe interact as far as items technically remaining in the Wardrobe while they are worn by a Person. | ||
- | |||
- | ===== Clothing Slots ===== | ||
- | |||
- | An article of Apparel may occupy one or more ClothingSlots. This prevents a character from wearing a dozen coats at the same time, for example. A shirt would occupy ClothingSlot.TORSO and a pair of pants would occupy ClothingSlot.LEGS. A dress would occupy both ClothingSlot.TORSO and ClothingSlot.LEGS. | ||
- | |||
- | When a Person wears a particular article of Apparel, any currently worn articles that occupy the same ClothingSlots are removed. | ||
- | |||
- | Certain ClothingSlots can cover other ClothingSlots, | ||
- | |||
- | In general, you probably needn' | ||
- | |||
- | ==== LibEcho.Apparel.ClothingSlot ==== | ||
- | |||
- | ClothingSlot is an enumeration that describes what " | ||
- | |||
- | === ClothingSlot.UNDERPANTS === | ||
- | Boxers, briefs, panties, etc. | ||
- | * Covers: Nothing. | ||
- | * Covered By: LEGS, TORSO (if long), OVER (if long). | ||
- | |||
- | === ClothingSlot.UNDERSHIRT === | ||
- | Bras and such; T-shirts should use TORSO. | ||
- | * Covers: Nothing. | ||
- | * Covered By: TORSO (if not low - FIXME), OVER (if not low - FIXME). | ||
- | * (Under which is - FIXME): TORSO (if low), OVER (if low). | ||
- | |||
- | === ClothingSlot.UNDERLEGS === | ||
- | Socks and hosiery. | ||
- | * Covers: Nothing. | ||
- | * Covered By: LEGS+FEET (if LEGS are long and FEET are tall), OVER+FEET (if OVER is long and FEET are tall). | ||
- | |||
- | === ClothingSlot.TORSO === | ||
- | Shirts and tops. | ||
- | * Covers: UNDERSHIRT, UNDERPANTS (if long), NECK (if tall). | ||
- | * Covered By: OVER. | ||
- | |||
- | === ClothingSlot.LEGS === | ||
- | Pants, skirts, and bottoms; Socks and hosiery should use UNDERLEGS | ||
- | * Covers: UNDERPANTS, UNDERLEGS (if long and FEET slot contains something tall). | ||
- | * Covered By: OVER (if long). | ||
- | |||
- | === ClothingSlot.FEET === | ||
- | Shoes. Socks and hosiery should use UNDERLEGS. | ||
- | * Covers: UNDERLEGS (if tall and LEGS slot contains something long). | ||
- | * Covered By: OVER (if long). | ||
- | |||
- | === ClothingSlot.OVER === | ||
- | Coats and shawls. | ||
- | * Covers: TORSO, UNDERSHIRT, LEGS (if long), UNDERPANTS (if long), UNDERLEGS (if long and FEET slot contains something tall), NECK (if tall). | ||
- | * Covered By: Nothing. | ||
- | |||
- | === ClothingSlot.GLOVES === | ||
- | Gloves. | ||
- | * Covers: FINGER, WRIST (if long). | ||
- | * Covered By: Nothing. | ||
- | |||
- | === ClothingSlot.HEAD === | ||
- | Hats and helmets. | ||
- | * Covers: Ears (if long). | ||
- | * Covered By: Nothing. | ||
- | |||
- | === ClothingSlot.EARS === | ||
- | Earrings. Something like earmuffs probably should use HEAD. | ||
- | * Covers: Nothing. | ||
- | * Covered By: HEAD (if long). | ||
- | |||
- | === ClothingSlot.NECK === | ||
- | Necklaces and ties. | ||
- | * Covers: Nothing. | ||
- | * Covered By: TORSO (if tall), OVER (if tall). | ||
- | |||
- | === ClothingSlot.WRIST === | ||
- | Bracelets, watches. | ||
- | * Covers: Nothing. | ||
- | * Covered By: GLOVES (if long). | ||
- | |||
- | === ClothingSlot.FINGER === | ||
- | Rings. | ||
- | * Covers: Nothing. | ||
- | * Covered By: GLOVES. | ||
- | |||
- | === ClothingSlot.??? | ||
- | * FIXME Other piercing slots? | ||
- | * FIXME Should there be slots for sex toys? | ||
- | |||
- | ===== Apparel ===== | ||
- | |||
- | Apparel.GenericApparel provides the barebones base class from which all other Apparel types are derived. | ||
- | |||
- | Several specific apparel types are also provided, deriving from GenericApparel, | ||
- | |||
- | ==== Properties ==== | ||
- | |||
- | Articles of Apparel may have various properties. | ||
- | |||
- | === .genericName === | ||
- | The generic name of an object, printed when it is obvious what the item is but no details can be seen. The most obvious example would be a bra printing through a tight tshirt being referred to as just a " | ||
- | |||
- | The specific Apparel types all implement this property, but you may override it in defaults. | ||
- | |||
- | * Type: String | ||
- | * Required | ||
- | |||
- | === .name === | ||
- | The specific name of the apparel, printed when the apparel can be plainly seen. "A green peacoat" | ||
- | |||
- | * Type: String | ||
- | * Required | ||
- | |||
- | === .slots === | ||
- | An array of the ClothingSlots that the object occupies. | ||
- | |||
- | * Type: Array of ClothingSlot enumerations | ||
- | * Required | ||
- | |||
- | === .inventoryCategory === | ||
- | The category into which InventoryUI sorts the object. | ||
- | |||
- | * Type: String | ||
- | * Optional | ||
- | |||
- | === .wardrobeCategory === | ||
- | The category into which ApparelUI sorts the object. | ||
- | |||
- | * Type: String | ||
- | * Optional | ||
- | |||
- | === .long === | ||
- | If this property is true, the article of apparel will be considered " | ||
- | |||
- | * Type: Boolean | ||
- | * Optional | ||
- | |||
- | === .short === | ||
- | If this property is true, the article of apparel will be considered " | ||
- | |||
- | * Type: Boolean | ||
- | * Optional | ||
- | * FIXME Currently unimplemented | ||
- | |||
- | |||
- | === .high === | ||
- | If this property is true, the article of apparel will be considered " | ||
- | |||
- | * Type: Boolean | ||
- | * Optional | ||
- | |||
- | |||
- | === .low === | ||
- | If this property is true, the article of apparel will be considered " | ||
- | |||
- | * Type: Boolean | ||
- | * Optional | ||
- | * FIXME Currently unimplemented | ||
- | |||
- | |||
- | |||
- | === .transparent === | ||
- | If this property is true, the article of apparel will reveal whatever is worn beneath it regardless of what ClothingSlots is occupies. | ||
- | |||
- | * Type: Boolean | ||
- | * Optional | ||
- | |||
- | === .thin === | ||
- | The " | ||
- | |||
- | * Type: Boolean | ||
- | * Optional | ||
- | |||
- | ==== Generic Apparel Types ==== | ||
- | |||
- | A couple of generic Apparel types are provided. GenericApparel provides a bare-bones Apparel implementation from which which all other Apparel types are derived. | ||
- | |||
- | Unless you are actually extending the library, you probably don't need to use any of these GenericApparel classes. If you are just using the library in your game, you're probably better off using the specific Apparel classes. | ||
- | |||
- | However, if you need to create an article of Apparel that does not easily fit into any of the specific types, one of the generic types may be useful to you. | ||
- | |||
- | === LibEcho.Apparel.GenericApparel === | ||
- | |||
- | * Inherits from: PersistentObject | ||
- | |||
- | This is the generic Apparel type from which all other Apparel is derived. | ||
- | |||
- | === LibEcho.Apparel.GenericMenswear === | ||
- | |||
- | * Inherits from: GenericApparel | ||
- | |||
- | This is a generic Apparel type that will at some point provide defaults that associate it with masculine People. | ||
- | |||
- | At the current time, however, none of this is implemented, | ||
- | |||
- | As with GenericApparel, | ||
- | |||
- | === LibEcho.Apparel.GenericWomenswear === | ||
- | |||
- | * Inherits from: GenericApparel | ||
- | |||
- | This is a generic Apparel type that will at some point provide defaults that associate it with feminine People. | ||
- | |||
- | At the current time, however, none of this is implemented, | ||
- | |||
- | As with GenericApparel, | ||
- | |||
- | ==== Specific Apparel Types ==== | ||
- | |||
- | Several specific Apparel types are provided, which ought to cover most use-cases, simplifying the structure of the defaults files. | ||
- | |||
- | |||
- | === LibEcho.Apparel.Unisex.Coat === | ||
- | Unisex short coats, jackets, etc. FIXME need to implement LongCoat. | ||
- | * Inherits from: GenericApparel | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Unisex.Hat === | ||
- | Unisex headgear. | ||
- | * Inherits from: GenericApparel | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Unisex.Pants === | ||
- | Unisex long pants. | ||
- | * Inherits from: GenericApparel | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | * .long: true | ||
- | |||
- | === LibEcho.Apparel.Unisex.Shirt === | ||
- | Unisex shirt. | ||
- | * Inherits from: GenericApparel | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Unisex.Shoes === | ||
- | Unisex low-top shoes. | ||
- | * Inherits from: GenericApparel | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Unisex.ShoesTall === | ||
- | Unisex high-top shoes and boots. | ||
- | * Inherits from: Shoes | ||
- | * .tall: true | ||
- | |||
- | === LibEcho.Apparel.Unisex.Shorts === | ||
- | Unisex shorts. | ||
- | * Inherits from: Pants | ||
- | * .genericName: | ||
- | * .long: false | ||
- | |||
- | === LibEcho.Apparel.Unisex.Socks === | ||
- | Unisex socks. | ||
- | * Inherits from: GenericApparel | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Menswear.Boxers === | ||
- | Men's boxers. | ||
- | * Inherits from: GenericMenswear | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Menswear.Briefs === | ||
- | Men's briefs. | ||
- | * Inherits from: GenericMenswear | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Womenswear.Bra === | ||
- | Women' | ||
- | * Inherits from: GenericWomenswear | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Womenswear.Dress === | ||
- | Women' | ||
- | * Inherits from: GenericWomenswear | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Womenswear.DressLong === | ||
- | Women' | ||
- | * Inherits from: Dress | ||
- | * .genericName: | ||
- | * .long: true | ||
- | |||
- | === LibEcho.Apparel.Womenswear.Panties === | ||
- | Women' | ||
- | * Inherits from: GenericWomenswear | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Womenswear.PantsWomens === | ||
- | Women' | ||
- | * Inherits from: GenericWomenswear | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | * .long: true | ||
- | |||
- | === LibEcho.Apparel.Womenswear.ShirtWomens === | ||
- | Women' | ||
- | * Inherits from: GenericWomenswear | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Womenswear.ShoesWomens === | ||
- | Women' | ||
- | * Inherits from: GenericWomenswear | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Womenswear.ShoesWomensTall === | ||
- | Women' | ||
- | * Inherits from: ShoesWomens | ||
- | * .tall: true | ||
- | |||
- | === LibEcho.Apparel.Womenswear.ShortsWomens === | ||
- | Women' | ||
- | * Inherits from: PantsWomens | ||
- | * .genericName: | ||
- | * .long: false | ||
- | |||
- | === LibEcho.Apparel.Womenswear.Skirt === | ||
- | Women' | ||
- | * Inherits from: GenericWomenswear | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Womenswear.SkirtLong === | ||
- | Women' | ||
- | * Inherits from: Skirt | ||
- | * .genericName: | ||
- | * .long: true | ||
- | |||
- | === LibEcho.Apparel.Womenswear.Stockings === | ||
- | Women' | ||
- | * Inherits from: GenericWomenswear | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Jewelry.Bracelet === | ||
- | Bracelets. | ||
- | * Inherits from: GenericApparel FIXME | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Jewelry.Earrings === | ||
- | |||
- | Earrings. | ||
- | * Inherits from: GenericApparel FIXME | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Jewelry.Necklace === | ||
- | |||
- | Necklaces. | ||
- | * Inherits from: GenericApparel FIXME | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | === LibEcho.Apparel.Jewelry.Ring === | ||
- | |||
- | Rings. | ||
- | * Inherits from: GenericApparel FIXME | ||
- | * ClothingSlots: | ||
- | * .genericName: | ||
- | * .wardrobeCategory: | ||
- | |||
- | ===== Containers ===== | ||
- | |||
- | ==== LibEcho.Apparel.Wardrobe ==== | ||
- | |||
- | * Inherits from: GeneralInventory | ||
- | |||
- | This class, derived from GeneralInventory, | ||
- | |||
- | FIXME There is some hacky crap in the sort implementation to ensure that dresses are listed below bottoms. | ||
- | |||
- | ==== LibEcho.Apparel.WornApparel ==== | ||
- | |||
- | * Inherits from: Wardrobe | ||
- | |||
- | FIXME todo once the code is refactored. | ||
- | |||
- | ===== The Apparel UI ===== | ||
- | |||
- | ==== LibEcho.Apparel.ApparelUI ==== | ||
- | |||
- | * Inherits from: InventoryUI | ||
- | |||
- | FIXME todo once the code is refactored. | ||