修复背包

This commit is contained in:
草莓 2025-03-16 19:48:04 +08:00
parent 8d45c38f62
commit 7f2a1c1866

View File

@ -4490,6 +4490,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.actions._sys_ondown_lockControl, core.actions._sys_ondown_lockControl,
30 30
); );
////// 绘制提示同时播放错误音效 //////
ui.prototype.drawFailTip = function (text, id, frame) {
this.drawTip(text, id, frame);
core.playSound('error.mp3');
}
}, },
"额外信息": function () { "额外信息": function () {
/* /*
@ -6578,7 +6583,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
info.select.id && ["toolbox", "equipbox"].includes(core.status.event.id) info.select.id && ["toolbox", "equipbox"].includes(core.status.event.id)
) )
) { ) {
core.drawFailTip("发生了未知错误!"); core.drawTip("发生了未知错误!");
return; return;
} }
return info.select.id; return info.select.id;
@ -6595,7 +6600,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
} }
} catch (e) { } catch (e) {
console.error(e); console.error(e);
core.drawFailTip("批量使用时出现未知错误!"); core.drawTip("批量使用时出现未知错误!");
} }
} }
@ -6624,11 +6629,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
const id = getSelectedItem(); const id = getSelectedItem();
if (Number.isNaN(value) || value < 0 || value > 99) { if (Number.isNaN(value) || value < 0 || value > 99) {
core.drawFailTip("输入不合法!"); core.drawTip("输入不合法!");
return; return;
} }
if (!core.canUseItem(id)) { if (!core.canUseItem(id)) {
core.drawFailTip("当前无法使用该道具!"); core.drawTip("当前无法使用该道具!");
return; return;
} }
core.closePanel(); core.closePanel();