Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// doesContainAssetAt.js
(function () {
  /*global adventurejs A*/
  "use strict";
  var p = adventurejs.Tangible.prototype;
  /**
   * Check whether this asset contains the specified asset
   * at the specified aspect.
   * @memberOf adventurejs.Tangible
   * @method adventurejs.Tangible#doesContainAssetAt
   * @param {String} id
   * @param {String} aspect
   * @returns {Boolean}
   */
  p.doesContainAssetAt = function Tangible_doesContainAssetAt(id, aspect) {
    if (!id) return false;
    if (!aspect) return false;
    if (!this.aspects[aspect]) return false;
    if (-1 < this.aspects[aspect].contents.indexOf(id)) return true;
    return false;
  }; // doesContainAssetAt.js
})();