Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// doesContainSubstance.js
(function () {
  /*global adventurejs A*/
  "use strict";
  var p = adventurejs.Tangible.prototype;
  /**
   * Check whether this asset contains the specified substance.
   * @memberOf adventurejs.Tangible
   * @method adventurejs.Tangible#doesContainSubstance
   * @param {String} id
   * @returns {String}
   */
  p.doesContainSubstance = function Tangible_doesContainSubstance(id) {
    if (!id) return false;
    var aspect = this.getAspectWithVessel();
    if (aspect && id === this.aspects[aspect].vessel.substance_id) {
      return aspect;
    }
    return "";
  }; // doesContainSubstance.js
})();