Fix autosave
This commit is contained in:
parent
7a50a3c674
commit
af682ca837
@ -2305,6 +2305,7 @@ actions.prototype._clickStorageRemove_all = function () {
|
|||||||
core.saves.ids = {};
|
core.saves.ids = {};
|
||||||
core.saves.autosave.data = null;
|
core.saves.autosave.data = null;
|
||||||
core.saves.autosave.updated = false;
|
core.saves.autosave.updated = false;
|
||||||
|
core.saves.autosave.now = 0;
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
core.saves.saveIndex = 1;
|
core.saves.saveIndex = 1;
|
||||||
core.saves.favorite = [];
|
core.saves.favorite = [];
|
||||||
@ -2330,6 +2331,7 @@ actions.prototype._clickStorageRemove_current = function () {
|
|||||||
core.saves.ids = {};
|
core.saves.ids = {};
|
||||||
core.saves.autosave.data = null;
|
core.saves.autosave.data = null;
|
||||||
core.saves.autosave.updated = false;
|
core.saves.autosave.updated = false;
|
||||||
|
core.saves.autosave.now = 0;
|
||||||
core.ui.closePanel();
|
core.ui.closePanel();
|
||||||
core.saves.saveIndex = 1;
|
core.saves.saveIndex = 1;
|
||||||
core.saves.favorite = [];
|
core.saves.favorite = [];
|
||||||
|
|||||||
@ -1673,17 +1673,12 @@ control.prototype._doSL_save = function (id) {
|
|||||||
|
|
||||||
control.prototype._doSL_load = function (id, callback) {
|
control.prototype._doSL_load = function (id, callback) {
|
||||||
if (id == 'autoSave' && core.saves.autosave.data != null) {
|
if (id == 'autoSave' && core.saves.autosave.data != null) {
|
||||||
core.saves.autosave.now=core.saves.autosave.now-1;
|
core.saves.autosave.now -= 1;
|
||||||
var data = core.saves.autosave.data.splice(core.saves.autosave.now, 1)[0];
|
var data = core.saves.autosave.data.splice(core.saves.autosave.now, 1)[0];
|
||||||
if(core.status.played && !core.status.gameOver)
|
|
||||||
{
|
|
||||||
core.control.autosave(0);
|
|
||||||
core.saves.autosave.now=core.saves.autosave.now-1;
|
|
||||||
}
|
|
||||||
if(core.saves.autosave.now==0)
|
if(core.saves.autosave.now==0)
|
||||||
{
|
{
|
||||||
core.saves.autosave.data.unshift(core.clone(data));
|
core.saves.autosave.data.unshift(core.clone(data));
|
||||||
core.saves.autosave.now=core.saves.autosave.now+1;
|
core.saves.autosave.now += 1;
|
||||||
}
|
}
|
||||||
callback(id, data);
|
callback(id, data);
|
||||||
}
|
}
|
||||||
@ -1709,7 +1704,7 @@ control.prototype._doSL_load = function (id, callback) {
|
|||||||
control.prototype._doSL_reload = function (id, callback) {
|
control.prototype._doSL_reload = function (id, callback) {
|
||||||
if (core.saves.autosave.data != null && core.saves.autosave.now < core.saves.autosave.data.length) {
|
if (core.saves.autosave.data != null && core.saves.autosave.now < core.saves.autosave.data.length) {
|
||||||
var data = core.saves.autosave.data.splice(core.saves.autosave.now, 1)[0];
|
var data = core.saves.autosave.data.splice(core.saves.autosave.now, 1)[0];
|
||||||
core.control.autosave(0);
|
core.control.autosave(false);
|
||||||
callback(id, data);
|
callback(id, data);
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
|||||||
@ -922,13 +922,13 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
|
|||||||
case 118: // F7:开启debug模式
|
case 118: // F7:开启debug模式
|
||||||
core.debug();
|
core.debug();
|
||||||
break;
|
break;
|
||||||
/*case 87: // W:开启技能“二倍斩”
|
case 70: // F:开启技能“二倍斩”
|
||||||
// 检测是否拥有“二倍斩”这个技能道具
|
// 检测是否拥有“二倍斩”这个技能道具
|
||||||
if (core.hasItem('skill1')) {
|
if (core.hasItem('skill1')) {
|
||||||
core.status.route.push("key:87");
|
core.status.route.push("key:70");
|
||||||
core.useItem('skill1', true);
|
core.useItem('skill1', true);
|
||||||
}
|
}
|
||||||
break;*/
|
break;
|
||||||
// 在这里可以任意新增或编辑已有的快捷键内容
|
// 在这里可以任意新增或编辑已有的快捷键内容
|
||||||
/*
|
/*
|
||||||
case 0: // 使用该按键的keyCode
|
case 0: // 使用该按键的keyCode
|
||||||
|
|||||||
@ -1,3 +0,0 @@
|
|||||||
原先的版本中A键可以回到之前的自动存档状态
|
|
||||||
现在A和W可以在最近的若干状态来回滚动
|
|
||||||
为了方便手机 默认56两个数字键是同样功能 可在按键设置中自己修改
|
|
||||||
Loading…
Reference in New Issue
Block a user