This is an old revision of the document!
People comprise major and minor characters – anyone who might need an inventory, be able to change apparel, or be transformed through the library's transformation mechanics.
Supporting characters, that is anyone who doesn't specifically require the functionality herein, need not be defined using this class. Just write them into the story as usual.
At the moment only GenericPerson is implemented. At some point I'll implement Man and Woman with some sensible defaults, but probably not until the transformation mechanics are more complete.
Inherits from: PersistentObject
The base class from which all other People are derived. Derived classes may implement a *.gender* getter that returns the appropriate gender string (for usage by the {@link LibEcho.Grammar|Grammar} module. Otherwise, whatever value has been defined by {@link LibEcho.Persistence.define|Persistence.define()} will be returned.
The person's inventory.
Define this in your defaults using inventory.contents = [ “item id”, “item id”, … ] in the Person definition. The actual inventory object itself is created and initialized in the Person constructor.
The person's worn apparel.
Define this in your defaults using apparel.contents = [ “item id”, “item id”, … ] in the Person definition. The actual worn apparel object itself is created and initialized in the Person constructor.
Note that it is possible to accidentally assign multiple articles of apparel to the same ClothingSlot when initializing like this. It won't produce an error, but it may produce odd results. Be careful.
add .name etc etc from PersistentObject.