fix:修复存档间的跳过剧情设置会互相干扰的bug
This commit is contained in:
parent
0d5ae14732
commit
d4400325ff
@ -53,6 +53,19 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
// 隐藏右下角的音乐按钮
|
// 隐藏右下角的音乐按钮
|
||||||
core.dom.musicBtn.style.display = 'none';
|
core.dom.musicBtn.style.display = 'none';
|
||||||
|
|
||||||
|
// 同步剧情跳过设置
|
||||||
|
switch (core.getFlag('skip')) {
|
||||||
|
case 'text':
|
||||||
|
core.plugin.skipTextOn();
|
||||||
|
break;
|
||||||
|
case 'perform':
|
||||||
|
core.plugin.skipPerformOn();
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
core.plugin.skipPerformOff();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// 清空录像暂停点
|
// 清空录像暂停点
|
||||||
core.setFlag('replayValve', null);
|
core.setFlag('replayValve', null);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -4031,10 +4031,14 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
}
|
}
|
||||||
|
|
||||||
const perform = {
|
const perform = {
|
||||||
jumpBlock: core.maps.jumpBlock, jumpHero: core.maps.jumpHero, moveBlock: core.maps.moveBlock,
|
jumpBlock: maps.prototype.jumpBlock,
|
||||||
drawAnimate: core.maps.drawAnimate, drawHeroAnimate: core.maps.drawHeroAnimate,
|
jumpHero: maps.prototype.jumpHero,
|
||||||
vibrate: core.events.vibrate, _action_sleep: core.events._action_sleep,
|
moveBlock: maps.prototype.moveBlock,
|
||||||
__action_checkReplaying: core.events.__action_checkReplaying,
|
drawAnimate: maps.prototype.drawAnimate,
|
||||||
|
drawHeroAnimate: maps.prototype.drawHeroAnimate,
|
||||||
|
vibrate: events.prototype.vibrate,
|
||||||
|
_action_sleep: events.prototype._action_sleep,
|
||||||
|
__action_checkReplaying: events.prototype.__action_checkReplaying,
|
||||||
};
|
};
|
||||||
|
|
||||||
function instantMove(fromX, fromY, aimX, aimY, keep, callback) {
|
function instantMove(fromX, fromY, aimX, aimY, keep, callback) {
|
||||||
@ -4046,22 +4050,37 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 这里是为了方便读档来回切换的情况
|
||||||
function skipTextOn() {
|
function skipTextOn() {
|
||||||
events.prototype.__action_checkReplaying = function () {
|
core.events.__action_checkReplaying = function () {
|
||||||
core.doAction();
|
core.doAction();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
core.maps.jumpBlock = perform.jumpBlock;
|
||||||
|
core.maps.jumpHero = perform.jumpHero;
|
||||||
|
core.maps.moveBlock = perform.moveBlock;
|
||||||
|
core.maps.drawAnimate = perform.drawAnimate;
|
||||||
|
core.maps.drawHeroAnimate = perform.drawHeroAnimate;
|
||||||
|
core.events.vibrate = perform.vibrate;
|
||||||
|
core.events._action_sleep = perform._action_sleep;
|
||||||
}
|
}
|
||||||
|
|
||||||
function skipTextOff() {
|
function skipTextOff() {
|
||||||
events.prototype.__action_checkReplaying = perform.__action_checkReplaying;
|
core.maps.jumpBlock = perform.jumpBlock;
|
||||||
|
core.maps.jumpHero = perform.jumpHero;
|
||||||
|
core.maps.moveBlock = perform.moveBlock;
|
||||||
|
core.maps.drawAnimate = perform.drawAnimate;
|
||||||
|
core.maps.drawHeroAnimate = perform.drawHeroAnimate;
|
||||||
|
core.events.vibrate = perform.vibrate;
|
||||||
|
core.events._action_sleep = perform._action_sleep;
|
||||||
|
core.events.__action_checkReplaying = perform.__action_checkReplaying;
|
||||||
}
|
}
|
||||||
|
|
||||||
function skipPeformOn() {
|
function skipPeformOn() {
|
||||||
maps.prototype.jumpBlock = function (sx, sy, ex, ey, time, keep, callback) {
|
core.maps.jumpBlock = function (sx, sy, ex, ey, time, keep, callback) {
|
||||||
return instantMove(sx, sy, ex, ey, keep, callback);
|
return instantMove(sx, sy, ex, ey, keep, callback);
|
||||||
}
|
}
|
||||||
maps.prototype.jumpHero = function (ex, ey, time, callback) {
|
core.maps.jumpHero = function (ex, ey, time, callback) {
|
||||||
core.setHeroLoc('x', ex);
|
core.setHeroLoc('x', ex);
|
||||||
core.setHeroLoc('y', ey);
|
core.setHeroLoc('y', ey);
|
||||||
core.clearMap('hero');
|
core.clearMap('hero');
|
||||||
@ -4069,44 +4088,60 @@ var plugins_bb40132b_638b_4a9f_b028_d3fe47acc8d1 =
|
|||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
}
|
}
|
||||||
|
|
||||||
maps.prototype.moveBlock = function (x, y, steps, time, keep, callback) {
|
core.maps.moveBlock = function (x, y, steps, time, keep, callback) {
|
||||||
perform.moveBlock(x, y, steps, 1, keep, callback);
|
perform.moveBlock(x, y, steps, 1, keep, callback);
|
||||||
}
|
}
|
||||||
|
|
||||||
maps.prototype.drawAnimate = function (name, x, y, alignWindow, callback) {
|
core.maps.drawAnimate = function (name, x, y, alignWindow, callback) {
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
maps.prototype.drawHeroAnimate = function (name, callback) {
|
core.maps.drawHeroAnimate = function (name, callback) {
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
events.prototype.vibrate = function () {
|
core.events.vibrate = function () {
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
events.prototype._action_sleep = function (data, x, y, prefix) {
|
core.events._action_sleep = function (data, x, y, prefix) {
|
||||||
core.doAction();
|
core.doAction();
|
||||||
}
|
}
|
||||||
|
|
||||||
events.prototype.__action_checkReplaying = function () {
|
core.events.__action_checkReplaying = function () {
|
||||||
core.doAction();
|
core.doAction();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function skipPeformOff() {
|
function skipPeformOff() {
|
||||||
maps.prototype.jumpBlock = perform.jumpBlock;
|
core.maps.jumpBlock = perform.jumpBlock;
|
||||||
maps.prototype.jumpHero = perform.jumpHero;
|
core.maps.jumpHero = perform.jumpHero;
|
||||||
maps.prototype.moveBlock = perform.moveBlock;
|
core.maps.moveBlock = perform.moveBlock;
|
||||||
maps.prototype.drawAnimate = perform.drawAnimate;
|
core.maps.drawAnimate = perform.drawAnimate;
|
||||||
maps.prototype.drawHeroAnimate = perform.drawHeroAnimate;
|
core.maps.drawHeroAnimate = perform.drawHeroAnimate;
|
||||||
events.prototype.vibrate = perform.vibrate;
|
core.events.vibrate = perform.vibrate;
|
||||||
events.prototype._action_sleep = perform._action_sleep;
|
core.events._action_sleep = perform._action_sleep;
|
||||||
events.prototype.__action_checkReplaying = perform.__action_checkReplaying;
|
core.events.__action_checkReplaying = perform.__action_checkReplaying;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 每次读档时执行下列函数,避免不同存档的设置相互干扰
|
||||||
|
this.skipTextOn = function () {
|
||||||
|
skipTextOn();
|
||||||
|
core.setFlag('skip', 'text');
|
||||||
|
}
|
||||||
|
|
||||||
|
this.skipPerformOn = function () {
|
||||||
|
skipPeformOn();
|
||||||
|
core.setFlag('skip', 'perform');
|
||||||
|
}
|
||||||
|
|
||||||
|
this.skipPerformOff = function () {
|
||||||
|
skipPeformOff();
|
||||||
|
core.setFlag('skip', null);
|
||||||
}
|
}
|
||||||
|
|
||||||
const settingMap = new Map([
|
const settingMap = new Map([
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user