I trying to make a modification to the VE Materia Plugin when the reEquipMaterias() function is called that it will check if the materia is able to be equipped. This is a MV plugin im using fossil to run it.
I have been tooling around with this part (the This here line) and it seems to be where i can check to see if the materia is equippable. The materia is considered armor and uses armor types if that helps.
Ive tried this way with calls for the below function but it keeps telling me that its not a function.
I dont know if there is another way to check if the materia is useable, any help would be appreciated.
Game_Actor.prototype.reEquipMaterias = function(slots, materias, j) {
materias.forEach(function(materia, i) {
if (slots && slots.materias.length > i) {
slots.materias[i] = materia;
} else if (materia && !this._isEquipClone) { // This here
$gameParty.gainMateria(materia, 1);
}
}, this)
};
I have been tooling around with this part (the This here line) and it seems to be where i can check to see if the materia is equippable. The materia is considered armor and uses armor types if that helps.
else if (materia && (!this._isEquipClone || "check for equippable here"))Ive tried this way with calls for the below function but it keeps telling me that its not a function.
Window_MateriaItem.prototype.canEquipMateria = function(materia) {
var item = materia.item() || {};
return (item.atypeId === 0 || this.actor().canEquip(item)) &&
(item.atypeId === this.slot() || (this.slot() === 0));
};
I dont know if there is another way to check if the materia is useable, any help would be appreciated.