// hasContentsAtAspect.js
(function () {
/* global AdventureJS A */
var p = AdventureJS.Assets.Entity.prototype;
/**
* Determine whether asset has contents at the specified aspect.
* @memberOf AdventureJS.Assets.Entity
* @method AdventureJS.Assets.Entity#hasContentsAtAspect
* @param {String} aspect
* @return {Boolean}
*/
p.hasContentsAtAspect = p.hasContentsAt = function Entity_hasContentsAtAspect(
aspect
) {
if (
!this.hasAspectAt(aspect) ||
!this.aspects[aspect].contents ||
this.aspects[aspect].contents.length === 0
) {
return false;
}
return true;
};
})();