// $hasKey.js
(function() {
/*global adventurejs A*/
"use strict";
var p = adventurejs.Character.prototype;
/**
* Checks to see if player has any keys to unlock the specified asset.
* @memberOf adventurejs.Character
* @method adventurejs.Character#$hasKey
* @param {Object|String} direct_object An asset or asset ID to unlock.
* @returns {Array} An array of Key assets, if player has any.
*/
p.$hasKey = function Character__hasKey(direct_object)
{
return this.getIOVkeys('unlock',direct_object).length?true:false;
}
}());