(function () {
var p = adventurejs.Parser.prototype;
p.selectNotInHands = function Parser_selectNotInHands(list) {
if ("string" === typeof list) list = [list];
if (!Array.isArray(list)) {
this.game.log(
"L1210",
"warn",
"critical",
"selectNotInHands.js > received non-array",
"Parser"
);
return [];
}
var foundObjects = [];
for (var i = 0; i < list.length; i++) {
var object = this.game.getAsset(list[i]);
if (object instanceof adventurejs.Substance) {
foundObjects.push(list[i]);
continue;
}
if (object instanceof adventurejs.Room) {
foundObjects.push(list[i]);
continue;
}
if (!object.getPlaceAsset) continue;
var parent = object.getPlaceAsset();
if (!parent) continue;
if (parent.id === this.game.world._player && !object.is.worn) {
continue;
}
foundObjects.push(list[i]);
}
return foundObjects;
};
})();