-
Notifications
You must be signed in to change notification settings - Fork 2
/
mobile-instances.js
20 lines (20 loc) · 1.06 KB
/
mobile-instances.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/** Configure MobileInstance object as extension of Mobile */
module.exports.configMobileInstance = (world, ext, extConfig) => {
return {
tableName: `mobile_instances`,
className: `MobileInstance`,
extends: ext,
extendsConfig: extConfig,
properties: [
{ name: `deployment`, type: `Deployment`, store: false },
{ name: `description`, type: `varchar`, length: 512, default: `They look like the most boring person you could possibly imagine.` },
{ name: `equipment`, type: `Array`, arrayOf: { instanceOf: `ItemInstance` } },
{ name: `inventory`, type: `Array`, arrayOf: { instanceOf: `ItemInstance` } },
{ name: `names`, type: `Array`, arrayOf: { type: `varchar`, length: 32 }, default: [`person`] },
{ name: `prototype`, instanceOf: `MobilePrototype`, loadTransform: x => new world.MobilePrototype({ id: x }) },
{ name: `rarity`, type: `int` },
{ name: `room`, instanceOf: `Room`, store: false },
{ name: `roomDescription`, type: `varchar`, length: 80, default: `a boring person stands here` }
]
};
};