fix: 重播录像报错

This commit is contained in:
unanmed 2024-11-18 22:46:45 +08:00
parent aa2e0e0168
commit 31605615ce
2 changed files with 2 additions and 5 deletions

View File

@ -1342,7 +1342,6 @@ control.prototype.startReplay = function (list) {
core.status.replay.totalList = core.status.route.concat(list);
core.status.replay.steps = 0;
core.status.replay.save = [];
Mota.Plugin.require('replay_g').ready();
core.createCanvas('replay', 0, core._PY_ - 40, core._PX_, 40, 199);
core.setOpacity('replay', 0.6);
this._replay_drawProgress();

View File

@ -141,13 +141,14 @@ export function init() {
HeroSkill.toggleSkill(num);
}
core.updateStatusBar();
core.status.route.push(`skill:${toEmit}`);
core.replay();
return true;
}
core.registerReplayAction('skill', name => {
if (!name.startsWith('skill:')) return false;
const [type, skill] = name.split(':');
const [, skill] = name.split(':');
return skillAction(skill);
});
@ -157,13 +158,10 @@ export function init() {
const key = parseInt(name.slice(4));
if (key === 49) {
core.status.route.push(`skill:1`);
return skillAction('1');
} else if (key === 50) {
core.status.route.push(`skill:2`);
return skillAction('2');
} else if (key === 51) {
core.status.route.push(`skill:3`);
return skillAction('3');
}