diff --git a/project/plugins.js b/project/plugins.js index a4137f35..99ce49ca 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -3627,7 +3627,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = const ctx = core.dymCanvas[this.name]; const { x0, y0, marginTop } = this; const dy = this.oneItemHeight * currIndex + marginTop; - /** @type {Item} */ + /** @type {Item|{}} */ const item = core.material.items[itemId] || {}; const num = core.formatBigNumber(core.itemCount(itemId), 5) || 0; // 道具数量过大时需要format @@ -3973,8 +3973,11 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = function clearItemBoxCache() { UI._itemId = ''; UI.selectType = 'toolBox'; - [UI._toolInv, UI._equipInv, UI._equipSlots].forEach((menu) => { - if (menu) menu.index = 0; + [UI._toolInv, UI._equipInv, UI._equipSlots].forEach(menu => { + if (menu) { + menu.index = 0; + menu.page = 0; + } }); } // 每次存读档,及进行录像回放时调用,清空之前选中的道具信息 this.clearItemBoxCache = clearItemBoxCache; diff --git a/runtime.d.ts b/runtime.d.ts index c878c546..0e7157ff 100644 --- a/runtime.d.ts +++ b/runtime.d.ts @@ -119,6 +119,8 @@ type Enemy = { type Item = { cls: string + id: string + name?: string [key: string]: any } @@ -2086,7 +2088,7 @@ interface maps { * @param callback 动画停止后的回调函数,可选 * @returns 一个数字,可作为core.stopAnimate()的参数来立即停止播放(届时还可选择是否执行此次播放的回调函数) */ - drawAnimate(name: string, x: number, y: number, alignWindow: boolean, callback?: () => void): number + drawAnimate(name: string, x: number, y: number, alignWindow?: boolean, callback?: () => void): number /** * 播放跟随勇士的动画