RanvierMUD / core

Core engine code for Ranvier
https://ranviermud.com
MIT License
45 stars 41 forks source link

Make Account extend Metadatable #107

Closed seanohue closed 8 months ago

seanohue commented 4 years ago

This way it can use the getMeta/setMeta API and fires the metadata change events.

azigler commented 4 years ago

Looks good. You should also update the documentation for Account:

...
/**
 * Representation of a player's account
 *
 * @property {string} username
 * @property {Array<string>} characters List of character names in this account
 * @property {string} password Hashed password
 * @property {boolean} banned Whether this account is banned or not
 * @extends EventEmitter
 * @mixes Metadatable
 */
class Account extends Metadatable(EventEmitter) {
...