Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// hasVesselAtAspect.js
(function () {
  /*global adventurejs A*/
  "use strict";
  var p = adventurejs.Tangible.prototype;
  /**
   * Determine whether asset has substance at an aspect
   * at specified preposition.
   * @memberOf adventurejs.Tangible
   * @method adventurejs.Tangible#hasVesselAtAspect
   * @param {String} aspect
   * @return {Boolean}
   */
  p.hasVesselAtAspect = function Tangible_hasVesselAtAspect(aspect) {
    if (
      !aspect ||
      !this.aspects ||
      !this.aspects[aspect] ||
      !this.aspects[aspect].class ||
      !this.aspects[aspect].vessel ||
      !this.aspects[aspect].vessel.class
    ) {
      return false;
    }
    return true;
  };
})();