Table of Contents

LibEcho.People

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.

FIXME 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.

LibEcho.People.GenericPerson

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.

Properties

.inventory

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.

.apparel

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.

.someProperty

FIXME add .name etc etc from PersistentObject.