From 755600d3c89aa4f03123d2cc9bdf795499619852 Mon Sep 17 00:00:00 2001 From: ShakeFlower Date: Wed, 28 May 2025 14:13:11 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E7=B1=BB=E5=9E=8B=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- project/plugins.js | 24 +++++++++--------------- runtime.d.ts | 19 +++++++++++++------ 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/project/plugins.js b/project/plugins.js index 9dc37cee..0d0f7b1d 100644 --- a/project/plugins.js +++ b/project/plugins.js @@ -941,7 +941,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = var _drawTip = core.ui.drawTip; core.ui.drawTip = function () { }; var _playSound = core.control.playSound; - core.control.playSound = function () { } + core.control.playSound = function () { return undefined; }; // 记录当前录像,因为可能存在换装问题 core.clearRouteFolding(); var routeLength = core.status.route.length; @@ -1166,9 +1166,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = core.plugin.tickerSet.forEach((ticker) => ticker.destroy()); } - // var M = Object.defineProperty; - // var E = (n, i, t) => i in n ? M(n, i, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[i] = t; - // var o = (n, i, t) => (E(n, typeof i != "symbol" ? i + "" : i, t), t); let w = []; const k = (n) => { for (const i of w) @@ -1301,18 +1298,18 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = resize: 0, rotate: 0, shake: 0, - "@@bind": [] + /** @type {number[]} */"@@bind": [] }, custom: {} }; this.animateFn = { system: { - move: [() => 0, () => 0], - moveAs: () => 0, - resize: () => 0, - rotate: () => 0, - shake: () => 0, - "@@bind": () => 0 + move: [() => { }, () => { }], + moveAs: () => { }, + resize: () => { }, + rotate: () => { }, + shake: () => { }, + "@@bind": () => { } }, custom: {} }; @@ -1651,7 +1648,7 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = "Unexpected parameters are delivered in inverse trigo timing function." ); } - + /** @param {(input:number) => number} [i=() => 1] */ function B(n, i = () => 1) { let t = -1; return (e) => (t *= -1, e < 0.5 ? n * i(e * 2) * t : n * i((1 - e) * 2) * t); @@ -4266,7 +4263,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = () => ' < 放缩:' + Math.max(core.domStyle.scale, 1) + 'x', () => { core.actions._clickSwitchs_display_setSize(-1); - core.plugin.settingMenu.drawContent(); }, '放缩。', false, // 录像中不可录入任何DOM操作 @@ -4275,7 +4271,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = () => ' > ', () => { core.actions._clickSwitchs_display_setSize(1); - core.plugin.settingMenu.drawContent(); }, '放缩。', false, @@ -4320,7 +4315,6 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 = () => '自动放缩:' + (core.getLocalStorage('autoScale') ? '开' : '关'), () => { core.setLocalStorage('autoScale', core.getLocalStorage('autoScale') ? false : true); - core.plugin.settingMenu.drawContent(); }, '自动放缩。', false, diff --git a/runtime.d.ts b/runtime.d.ts index 4f8f7f70..3fb6368a 100644 --- a/runtime.d.ts +++ b/runtime.d.ts @@ -217,6 +217,12 @@ type gameStatus = { thisMap: ResolvedMap bgmaps: { [key: string]: number[][] } fgmaps: { [key: string]: number[][] } + + /** 五图层插件增加的背景层2 */ + bg2maps: { [key: string]: number[][] } + /** 五图层插件增加的前景层2 */ + fg2maps: { [key: string]: number[][] } + mapBlockObjs: { [key: string]: any } /** 显伤伤害 */ checkBlock: { @@ -368,7 +374,7 @@ type editor = { dom: { canvas: string[] maps: string[] - [x: string]: string[] | CanvasRenderingContext2D | HTMLCanvasElement + [x: string]: string[] | CanvasRenderingContext2D | HTMLCanvasElement | HTMLInputElement | HTMLOptionElement } fgmap: any[]; file: Object; @@ -384,6 +390,7 @@ type editor = { mode: Object; pos: Object; printe: Function; + uifunctions: { [x: string]: Function } uivalues: Object; useCompress: boolean; used_flags: Object; @@ -934,7 +941,7 @@ interface control { triggerBgm(): void /** 播放一个音效 */ - playSound(sound: string, pitch?: number, callback?: () => any): number + playSound(sound: string, pitch?: number, callback?: () => any): number | undefined /** 停止(所有)音频 */ stopSound(id?: number): void @@ -3056,11 +3063,11 @@ interface plugin { /** 高级动画相关的类 */ animate: { - Animation: any, AnimationBase: any, Ticker: any, Transition: any, bezier: any, bezierPath: any, circle: any, - hyper: any, inverseTrigo: any, linear: any, power: any, shake: any, sleep: any, trigo: any, + Animation?: any, AnimationBase?: any, Ticker?: any, Transition?: any, bezier?: any, bezierPath?: any, circle?: any, + hyper?: any, inverseTrigo?: any, linear?: any, power?: any, shake?: any, sleep?: any, trigo?: any, } /** 该集合中的所有Ticker在跨层时需要被摧毁 */ - tickerSet: Set + tickerSet: Set /** 打开一个道具商店 */ openItemShop: (itemShopId: string) => void @@ -3314,7 +3321,7 @@ type CoreMixin = { moveTime: number lastLegTime: number /** 插件"勇士4帧动画"开启时为number */ - leftLeg: boolean | number, + leftLeg: number, readonly weather: { time: number type: any