// DrinkingGlass.js
(function () {
/*global adventurejs A*/
"use strict";
/**
* @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.Container.LiquidContainer.DrinkingGlass
* @augments adventurejs.LiquidContainer
* @class adventurejs.DrinkingGlass
* @ajsconstruct MyGame.createAsset({ "class":"DrinkingGlass", "name":"foo", [...] })
* @ajsconstructedby adventurejs.Game#createAsset
* @ajsnavheading KitchenClasses
* @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 My partner will high-dive into this ordinary glass o' water.
* @classdesc
* <p>
* <strong>DrinkingGlass</strong> is a subclass of
* {@link adventurejs.LiquidContainer|LiquidContainer}.
* Player can drink from it, pour from it, pour into it.
* It has low opacity so it can be seen through.
* Authors can set a maximum volume / current volume
* for DrinkingGlass.
* </p>
* <h3 class="examples">Example:</h3>
* <pre class="display"><code class="language-javascript">MyGame.createAsset({
* class: "DrinkingGlass",
* name: "crystal goblet",
* descriptions: { look: "It's a crystal goblet. Not the cup of a carpenter. ", },
* in: {
* vessel: {
* maxvolume: 1000,
* volume: 500,
* substance_id: "wine",
* },
* },
* });
* </code></pre>
**/
class DrinkingGlass extends adventurejs.LiquidContainer {
constructor(name, game_name) {
super(name, game_name);
this.class = "DrinkingGlass";
this.noun = "glass";
this.plural = "glasses";
this.singlePluralPairs = [["glass", "glasses"]];
this.adjectives = ["drinking"];
this.setDOVs(["take", "give", "put"]);
this.dimensions.opacity = 0.1;
this.aspects.in.vessel.maxvolume = 500;
}
}
adventurejs.DrinkingGlass = DrinkingGlass;
})();