Echo Hollow

Because Pr0n is the Highest Form of Art.

User Tools

Site Tools


smutbook:classes:apparel:wornapparel

WornApparel

FIXME This is all changing, and this info isn't correct. It will be updated once the code is done.

  • Inherits from: Wardrobe

This class, derived from Wardrobe, is meant to track worn Apparel. It overrides preAdd() so that only objects of type GenericApparel (or subclasses thereof) may be added to the Inventory. The Wardrobe parent class also overrides sort() so that the contents are sorted in order of ClothingSlot value rather than alphabetically.

static WornApparel.defineCoveredBy( slot, resolverFunction )

This function is used internally to define what slots cover other slots. The only time you'll need to use it is if you are defining new ClothingSlots. FIXME It is currently in the WornApparel constructor, which is stupid. We should be building the function table in the ClothingSlots source file.

  • Type: Function
  • Returns: Nothing

.itemsConflictWith( item )

  • Type: Function
  • item: The article of apparel to check.
  • Returns: a list of worn apparel that occupies the same clothing slots as the given item.

.atSlot( slot )

  • Type: Function
  • slot: the clothing slot to check
  • Returns: The article of Apparel (if any) that occupies the given clothing slot.

.hiddenBy( item )

  • Type: Function
  • item: The article of apparel to check.
  • Returns: an array of Apparel that are concealed beneath the given item.

.hiding( item )

  • Type: Function
  • item: The article of apparel to check.
  • Returns: an array of Apparel that are concealing the given item.

.outlinedBy( item )

  • Type: Function
  • item: The article of apparel to check.
  • Returns: an array of apparel that are outlined by the given item.

.showingOutlineOf( item )

FIXME in source: Should thin items beneath other thin items not show an outline? Ie, the whole point of a thong being to not show an outline? FIXME

  • Type: Function
  • item: The article of apparel to check.
  • Returns: an array of apparel that are showing the outline of the given item.

.getHidden( filterClass=undefined, filterFunction=undefined )

This functions like GeneralInventory.get(), except it returns only the apparel that are concealed beneath other apparel.

  • Type: Function
  • filterClass: an optional filter class.
  • filterFunction: an optional filter function.
  • Returns: A list of concealed items.

.getVisible( filterClass=undefined, filterFunction=undefined )

This functions like GeneralInventory.get(), except it returns only the apparel that are visible.

  • Type: Function
  • filterClass: an optional filter class.
  • filterFunction: an optional filter function.
  • Returns: A list of visible items.

.getOutlined( filterClass=undefined, filterFunction=undefined )

This functions like GeneralInventory.get(), except it returns only the apparel that are outlined through more outer layers that are thin. FIXME Check to make sure this is working properly. ie a bra showing an outline through a tight shirt should still be concealed by a coat worn overtop.

  • Type: Function
  • filterClass: an optional filter class.
  • filterFunction: an optional filter function.
  • Returns: A list of visible items.

.toString( showAll=undefined )

Overridden. FIXME This function currently doesn't to anything beyond the implementation in GeneralInventory. It ought to be checking the viewpoint character and basing its results on that. The viewpoint character, when looking at their own WornApparel, should get a list of everything, even the concealed layers. But when looking at someone else's WornApparel, should only get a list of that which is visible and showing an outline of. It should also take an arg to force one behavior or the other.

  • Type: Function
  • showAll: if true, all contained items are printed. If false, only visible items are printed. If undefined, acts as true if this WornApparel's parent is the $viewpointCharacter, otherwise acts as false.
  • Returns: Returns: a serial-comma-separated-list of the contents' .aName fields.

.theString( showAll=undefined )

Like toString(), but using .theName instead. FIXME This needs to be implemented the same as toString() with regard to showAll.

  • Type: Function
  • showAll: if true, all contained items are printed. If false, only visible items are printed. If undefined, acts as true if this WornApparel's parent is the $viewpointCharacter, otherwise acts as false.
  • Returns: a serial-comma-separated-list of the contents' .theName fields.

smutbook/classes/apparel/wornapparel.txt · Last modified: 2023/08/09 19:50 by lee