Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// Desert.js
(function () {
  /*global adventurejs A*/

  /**
   * @ajspath adventurejs.Atom.Asset.Matter.Tangible.Thing.Reservoir.Desert
   * @augments adventurejs.Reservoir
   * @class adventurejs.Desert
   * @ajsconstruct MyGame.createAsset({ "class":"Desert", "name":"foo", [...] })
   * @ajsconstructedby adventurejs.Game#createAsset
   * @ajsnavheading ReservoirClasses
   * @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 base class for all kinds of containers which hold liquid.
   * @ajssubstancecontainer in
   * @ajstangiblecontainer in
   * @classdesc <strong>Desert</strong> is a child class
   * of {@link adventurejs.Reservoir|Reservoir}, an infinite substance
   * container that is part of the landscape.
   * It can be filled from and have things poured into it.
   * Unlike with smaller substance containers, no substance mixing will
   * occur if other substances are poured into it.
   * <pre class="display"><code class="language-javascript">MyGame.createAsset({
   *   class: "Desert",
   *   name: "Cat Poop Desert",
   *   descriptions: { look: "It's unclear why the desert was named Cat Poop Desert. Oh, wait... ", },
   *   contains: "sand",
   * });
   * </code></pre>
   **/
  class Desert extends adventurejs.Reservoir {
    constructor(name, game_name) {
      super(name, game_name);
      this.class = "Desert";

      this.setDOVs([]);
      this.setIOVs(["fill", "empty", "pour"]);

      this.contains = "sand";
      this.aspects.in.list_in_room = true;
      this.aspects.in.list_in_examine = true;
      //this.aspects.in.vessel.substance_id = "water";
    }

    initialize(game) {
      super.initialize(game);
      return this;
    }
  }
  adventurejs.Desert = Desert;
})();