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

  /**
   * @ajspath adventurejs.Atom.StateManager.Asset_Is.Substance_Is
   * @augments adventurejs.Asset_Is
   * @class adventurejs.Substance_Is
   * @ajsnavheading StateClasses
   * @param {String} game_name Name of top level game instance that is scoped to window.
   * @param {String} name Instance name.
   * @summary A container for state variables.
   * @classdesc
   * <p>
   * <strong>Substance_Is.js</strong> handles is.state management for
   * @TODO change is.substancetype to single constant?
   * {@link adventurejs.Substance|Substance Assets}.
   **/

  class Substance_Is extends adventurejs.Asset_Is {
    constructor(name = "is", game_name, parent_id) {
      // Call the constructor of the parent class
      super(name, game_name, parent_id);

      this.class = "Substance_Is";

      /**
       * Set whether this asset is liquid.
       * @var {Boolean} adventurejs.Substance#is!liquid
       * @default false
       */
      this.liquid = false;

      /**
       * Set whether this asset is gas.
       * @var {Boolean} adventurejs.Substance#is!liquid
       * @default false
       */
      this.gas = false;

      /**
       * Set whether this asset is solid.
       * @var {Boolean} adventurejs.Substance#is!liquid
       * @default false
       */
      this.solid = false;

      /**
       * Set whether this asset is slurry.
       * @var {Boolean} adventurejs.Substance#is!liquid
       * @default false
       */
      this.slurry = false;

      this.known = true;

      // this.is.global = true; // should substances be global?
      // this.is.singleton = true; // should substances be singleton?
    }
  }
  adventurejs.Substance_Is = Substance_Is;
})();