Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// DOVisConnectedToAnything.js
(function() {
	/*global adventurejs A*/ 
  "use strict";
  var p = adventurejs.Asset.prototype;	
  /**
   * Check whether this asset is currently connected to anything
   * directly by a verb such as <code class="property">plugIn</code>
   * or <code class="property">tie</code>. For example, if this asset 
   * is a computer plugged into an outlet, this method would return true.
   * @memberOf adventurejs.Asset
	 * @method adventurejs.Asset#DOVisConnectedToAnything
   * @param {String} verb The name of a verb.
   * @return {Boolean}
   */
  p.DOVisConnectedToAnything = function Asset_DOVisConnectedToAnything(verb) 
  {
    if( !verb || !this.game.dictionary.verbs[verb] ) return false;
    if( this.dov[verb]?.with_params.connections?.length )
    {
      return true;
    }  
    return false;
  }
}());