Little reminder. In Limited Skill Uses:
Yanfly.LSU.Window_SkillList_drawSkillCost =
Window_SkillList.prototype.drawSkillCost;
Window_SkillList.prototype.drawSkillCost = function(skill, wx, wy, width) {
if (skill && this._actor.isSkillLimitedEmpty(skill)) {
return this.drawSkillLimitEmpty(skill, wx, wy, width);
}
Yanfly.LSU.Window_SkillList_drawSkillCost.call(this, skill, wx, wy, width);
};
Can you make that a return Yanfly.LSU.Window_SkillList_drawSkillCost.call(this, skill, wx, wy, width);?
Also
Window_SkillList.prototype.drawSkillLimitEmpty = function(skill, wx, wy, ww) {
if (Yanfly.Icon.LimitedEmpty > 0) {
var iw = wx + ww - Window_Base._iconWidth;
this.drawIcon(Yanfly.Icon.LimitedEmpty, iw, wy + 2);
ww -= Window_Base._iconWidth + 2;
}
this.contents.fontSize = Yanfly.Param.LSUFontSize;
this.changeTextColor(this.textColor(Yanfly.Param.LSUTextColor));
var text = Yanfly.Param.LSUEmpty;
this.drawText(text, wx, wy, ww, 'right');
this.resetTextColor();
this.resetFontSettings();
};
This needs a return value too. And one more:
Window_SkillList.prototype.drawLimitedSkillUses = function(skill, wx, wy, dw) {
if (!this._actor.isSkillLimitedUse(skill)) return dw;
if (Yanfly.Param.LSUFormat === '') return dw;
if (Yanfly.Icon.LimitedUse > 0) {
var iw = wx + dw - Window_Base._iconWidth;
this.drawIcon(Yanfly.Icon.LimitedUse, iw, wy + 2);
dw -= Window_Base._iconWidth + 2;
}
this.contents.fontSize = Yanfly.Param.LSUFontSize;
this.changeTextColor(this.textColor(Yanfly.Param.LSUTextColor));
var fmt = Yanfly.Param.LSUFormat;
var current = this._actor.skillLimitedUseCurrent(skill.id);
current = Yanfly.Util.toGroup(current);
var max = this._actor.skillLimitedUseMax(skill.id);
max = Yanfly.Util.toGroup(max);
var text = fmt.format(current, max);
this.contents.fontSize = Yanfly.Param.LSUFontSize;
this.drawText(text, wx, wy, dw, 'right');
var returnWidth = dw - this.textWidth(text) - Yanfly.Param.SCCCostPadding;
this.resetTextColor();
this.resetFontSettings();
return dw;
};
Return returnWidth (or just don't use it and dw -= in the fourth-to-last line instead.)