fix:类型修正

This commit is contained in:
ShakeFlower 2025-05-28 14:13:11 +08:00
parent 574fa21160
commit 755600d3c8
2 changed files with 22 additions and 21 deletions

View File

@ -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,

19
runtime.d.ts vendored
View File

@ -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<any>
/** 打开一个道具商店 */
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