// doesContain.js
(function () {
/* global AdventureJS A */
var p = AdventureJS.Assets.Entity.prototype;
/**
* Check whether this asset contains the specified asset.
* Works with entities and substances.
* @memberOf AdventureJS.Assets.Entity
* @method AdventureJS.Assets.Entity#doesContain
* @param {String} id
* @returns {Boolean}
*/
p.doesContain = function Entity_contains(id) {
if (!id) return false;
let asset = this.game.getAsset(id);
if (!asset) return false;
if (asset instanceof AdventureJS.Assets.Substance) {
var aspect = this.getVesselPreposition();
return aspect && asset.id === this.aspects[aspect].vessel.substance_id;
}
return this.containsAsset(id);
}; // doesContain.js
})();