Pre-release
AdventureJS Docs Downloads
Score: 0 Moves: 0
// containsAsset.js
(function () {
  /*global adventurejs A*/
  var p = adventurejs.Tangible.prototype;
  /**
   * Check whether this asset contains the specified asset at any aspect.
   * @memberOf adventurejs.Tangible
   * @method adventurejs.Tangible#containsAsset
   * @param {String} id
   * @returns {String}
   */
  p.containsAsset = function Tangible_containsAsset(id) {
    if (!id) return false;
    for (var prop in this.aspects) {
      if (this.aspects[prop].contents.indexOf(id) > -1) return true;
    }
    return false;
  }; // containsAsset.js
})();