// Table.js
(function () {
/*global adventurejs A*/
"use strict";
/**
* @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.Furniture.Table
* @augments adventurejs.Furniture
* @class adventurejs.Table
* @ajsconstruct MyGame.createAsset({ "class":"Table", "name":"foo", [...] })
* @ajsconstructedby adventurejs.Game#createAsset
* @ajsnavheading FurnitureClasses
* @param {String} game_name The name of the top level game object.
* @param {String} name A name for the object, to be serialized and used as ID.
* @summary Time for din-din!
* @tutorial Tangibles_AboutTangibles
* @ajstangiblecontainer on
* @ajstangiblecontainer under
* @classdesc <strong>Table</strong> is child class of
* {@link adventurejs.Furniture|Furniture}. Put things on it or under it.
**/
class Table extends adventurejs.Furniture {
constructor(name, game_name) {
super(name, game_name);
this.class = "Table";
this.noun = "table";
this.plural = "tables";
this.singlePluralPairs = [["table", "tables"]];
this.default_aspect = "on";
this.can.jump_to = true;
(this.can.jump_from = true),
(this.aspects.under = new adventurejs.Aspect(
"under",
this.game_name
).set({
parent_id: this.id,
list_in_room: false,
list_in_examine: true,
maxheight: 3,
maxwidth: 6,
maxdepth: 3,
maxcount: 10,
maxsize: 10,
maxweight: 100,
player: {
posture: "sit",
can: {
enter: true,
kneel: true,
lie: true,
sit: true,
crawl: true,
},
},
}));
this.aspects.on.set({
maxheight: 3,
maxwidth: 6,
maxdepth: 3,
maxcount: 10,
maxsize: 10,
maxweight: 100,
player: {
posture: "stand",
can: { enter: true, kneel: true, lie: true, sit: true, jump: true },
},
});
}
}
adventurejs.Table = Table;
})();