// getAllContents.js
(function () {
/*global adventurejs A*/
"use strict";
var p = adventurejs.Tangible.prototype;
/**
* Returns an array of all content in any location
* @memberOf adventurejs.Tangible
* @method adventurejs.Tangible#getAllContents
* @return {Array}
*/
p.getAllContents = function Tangible_getAllContents() {
var contents = [];
for (var aspect in this.aspects) {
if (!this.hasAspectAt(aspect)) {
continue;
}
if (Array.isArray(this.aspects[aspect].contents)) {
contents = contents.concat(this.aspects[aspect].contents);
}
}
return contents;
};
})();