Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// StationaryTelescope.js
(function () {
  /*global adventurejs A*/
  "use strict";

  /**
   * @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.OpticalDevice.StationaryTelescope
   * @class adventurejs.StationaryTelescope
   * @augments adventurejs.OpticalDevice
   * @ajsconstruct MyGame.createAsset({ "class":"StationaryTelescope", "name":"foo", [...] })
   * @ajsconstructedby adventurejs.Game#createAsset
   * @ajsnavheading OpticalClasses
   * @param {String} name A name for the object, to be serialized and used as ID.
   * @param {String} game_name The name of the top level game object.
   * @summary You LOVE the Plane-arium.
   * @classdesc
   * <p>
   * <strong>StationaryTelescope</strong> is a subclass of
   * {@link adventurejs.OpticalDevice|OpticalDevice},
   * which can be looked through or with via
   * <code>iov.look</code>.
   * It differs from
   * {@link adventurejs.StationaryTelescope|Telescope}
   * in that it can't be carried.
   * </p>
   * <p>
   * Authors might find the distinction between
   * "look through" and "look with" unnecessary, in which case it's
   * possible to combine these verbs or disable one or the other.
   * To learn more, see
   * <a href="/doc/Verbs_ModifyVerbs.html">Modify Verbs</a>
   * </p>
   * <h3 class="examples">Example:</h3>
   * <pre class="display"><code class="language-javascript">MyGame.createAsset({
   *   class: "StationaryTelescope",
   *   name: "stationary telescope",
   *   descriptions: { look: "It's a big mounted telescope. ", },
   *   place: { in: "Observatory" },
   * });
   * </code></pre>
   **/
  class StationaryTelescope extends adventurejs.OpticalDevice {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "StationaryTelescope";

      this.singlePluralPairs = [["telescope", "telescopes"]];

      this.setDOVs(["tie"]);
      this.unsetDOVs(["take", "give", "shake"]);

      this.on_tie_to_this_take_this = false;
      this.on_tie_to_drag_behind_rope = false;

      // only if it's handheld
      this.must.be_in_hands_to_look_through = false;
    }
  }
  adventurejs.StationaryTelescope = StationaryTelescope;
})();