Trying to add 1 more check on return condition.. in this case i need to know if player posses the armor id into the party item armor inventory
also its not limited to 1 id it could be up to 5..
in the code below if i chose dress part nbr 6 (hands layer) who return ext: 6 using the addcommand function
(original game code turn ext:6 into stypeId:6)
resulting in only showing gloves (who have stypeId: 6) and not other clothing parts who have other stypeId's
and reducing result in only showing the gloves you have into your armor inventory.. in this case the glove who has armor id 111
when i add them into the inventory..
What im after is to replace the == 111 into something like ==$gameParty._armors
but i cant find a way to select only the 111 from $gameParty._armors (its returns "Object {111: 1}" and not 111)
Also im not sure that if i have more than 1 id in $gameParty._armors for gloves.. will it still work ?
like armor id 111 to show glove1 in list
and armor id 112 to show glove2 in list
also its not limited to 1 id it could be up to 5..
in the code below if i chose dress part nbr 6 (hands layer) who return ext: 6 using the addcommand function
(original game code turn ext:6 into stypeId:6)
Code:
Window_DressList.prototype.includes = function(item) {
return item && item.stypeId === this._stypeId && item.armorId == 111;
};
Window_DressList.prototype.isEnabled = function(item) {
return this._actor && this._actor.canUse(item);
};
Window_DressList.prototype.makeItemList = function() {
if (this._actor) {
this._data = this._actor._clothingGloves.filter(function(item) {
return this.includes(item);
}, this);
} else {
this._data = [];
}
};
resulting in only showing gloves (who have stypeId: 6) and not other clothing parts who have other stypeId's
and reducing result in only showing the gloves you have into your armor inventory.. in this case the glove who has armor id 111
when i add them into the inventory..
What im after is to replace the == 111 into something like ==$gameParty._armors
but i cant find a way to select only the 111 from $gameParty._armors (its returns "Object {111: 1}" and not 111)
Also im not sure that if i have more than 1 id in $gameParty._armors for gloves.. will it still work ?
like armor id 111 to show glove1 in list
and armor id 112 to show glove2 in list