Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// getVesselAt.js
(function () {
  /*global adventurejs A*/
  "use strict";
  var p = adventurejs.Tangible.prototype;
  /**
   * Get substance container at specified preposition.
   * @memberOf adventurejs.Tangible
   * @method adventurejs.Tangible#getVesselAt
   * @param {string} aspect - The aspect to check.
   * @return {Object|Null}
   */
  p.getVesselAt = function Tangible_getVesselAt(aspect) {
    if (
      !this.getAspectAt(aspect) ||
      !this.aspects[aspect].vessel ||
      !this.aspects[aspect].vessel.class
    ) {
      return null;
    }
    return this.aspects[aspect].vessel;
  };
})();