// FaucetHandle.js
(function () {
/*global adventurejs A*/
"use strict";
/**
* @ajspartof Sink
* @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.GraduatedController.Handle
* @augments adventurejs.GraduatedController
* @class adventurejs.FaucetHandle
* @ajsconstruct MyGame.createAsset({ "class":"FaucetHandle", "name":"foo", [...] })
* @ajsconstructedby adventurejs.Game#createAsset
* @ajsnavheading BathroomClasses
* @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 A handle that can be turned by degrees.
* @classdesc
* <strong>FaucetHandle</strong> is a subclass of
* {@link adventurejs.GraduatedController|GraduatedController}
* which can be used to affect levels of flow of
* {@link adventurejs.SubstanceEmitter|SubstanceEmitters},
* such as setting a sink handle which can be set to low, medium,
* or high or any number of positions in between.
* </p>
* <h3 class="examples">Example:</h3>
* <pre class="display"><code class="language-javascript">MyGame.createAsset({
* class: "FaucetHandle",
* name: "sink's cold water handle",
* synonyms: [ "handle", "sink handle" ],
* adjectives: [ "cold water", "sink", "porcelain" ],
* place: { attached: "sink" },
* description: "The sink's cold water handle. ",
* target_id: "sink faucet",
* set_substance_id: "water",
* set_substance_temperature: 15
* });
* </code></pre>
**/
class FaucetHandle extends adventurejs.GraduatedController {
constructor(name, game_name) {
super(name, game_name);
this.class = "FaucetHandle";
this.singlePluralPairs = [["handle", "handles"]];
this.descriptions.look = "It's a handle.";
this.setDOVs(["turn"]);
this.unsetDOVs(["give", "take"]);
this.is.listed_in_parent = false;
this.dimensions.width = 1;
this.dimensions.height = 1;
this.control_positions = 2; // toggle
//this.control_positions = 5; // range
}
}
adventurejs.FaucetHandle = FaucetHandle;
})();