fix:录像模式下打开新装备栏关不上

This commit is contained in:
ShakeFlower 2025-09-07 11:21:44 +08:00
parent 8678241111
commit 8037da8663

View File

@ -2877,6 +2877,15 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
core.actions._keyDownToolbox = core.actions._keyDownEquipbox = function (keyCode) { return true; }.bind(core.actions); core.actions._keyDownToolbox = core.actions._keyDownEquipbox = function (keyCode) { return true; }.bind(core.actions);
core.actions._clickToolbox = core.actions._clickEquipbox = function (x, y, px, py) { return true; }.bind(core.actions); core.actions._clickToolbox = core.actions._clickEquipbox = function (x, y, px, py) { return true; }.bind(core.actions);
core.actions._keyUpToolbox = core.actions._keyUpEquipbox = function (keyCode) { return true; }.bind(core.actions); core.actions._keyUpToolbox = core.actions._keyUpEquipbox = function (keyCode) { return true; }.bind(core.actions);
// 暂不考虑修改core.status.event.id该变量牵涉太多作用不完全清楚
// 录像模式下下列函数会进行检测,不处于特定模式时,阻止自定义监听事件
core.actions._checkReplaying = function () {
if (core.isReplaying() && !UI._back?.onDraw &&
['save', 'book', 'book-detail', 'viewMaps', 'toolbox', 'equipbox', 'text'].indexOf(core.status.event.id) < 0) {
return true;
}
return false;
}.bind(core.actions);
const oriClosePanel = core.ui.closePanel; const oriClosePanel = core.ui.closePanel;
core.ui.closePanel = function () { core.ui.closePanel = function () {
@ -4037,7 +4046,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
/** @param {'all'|'equips'} currType */ /** @param {'all'|'equips'} currType */
function drawItemBox(currType) { function drawItemBox(currType) {
UI.clearAll(); UI.clearAll();
if (UI._toolInv && UI._toolInv.onDraw && currType === UI.type) return; if (UI._toolInv && UI._toolInv?.onDraw && currType === UI.type) return;
core.lockControl(); core.lockControl();
UI.type = currType; UI.type = currType;
UI.itemInv.updateItemList(); UI.itemInv.updateItemList();