Pre-release
Adventure.js Docs Downloads
Score: 0 Moves: 0
// IOVhasDirectObjects.js
(function() {
	/*global adventurejs A*/ 
  "use strict";
  var p = adventurejs.Asset.prototype;	
  /**
   * <strong>IOVhasDirectObjects</strong> is a method to check 
   * whether this asset has any particular direct objects specified 
   * by the author for use with the specified verb.
   * @memberOf adventurejs.Asset
   * @method adventurejs.Asset#IOVhasDirectObjects
   * @param {String} verb
   * @returns {Boolean}
   */
  p.IOVhasDirectObjects = function Asset_IOVhasDirectObjects(verb)
  {
    if(!this.isIOV(verb)) return false;

    // is this.iov[verb].with_assets !empty?
    if( this.iov[verb]?.with_assets.length )
    {
      return true;
    }

    // is this.iov[verb].with_classes !empty?
    if( this.iov[verb]?.with_classes.length )
    {
      return true;
    }
    
    return false;

  }
}());