Fix autosave

This commit is contained in:
ckcz123 2020-04-30 10:51:48 +08:00
parent 7a50a3c674
commit af682ca837
4 changed files with 18 additions and 24 deletions

View File

@ -2305,6 +2305,7 @@ actions.prototype._clickStorageRemove_all = function () {
core.saves.ids = {};
core.saves.autosave.data = null;
core.saves.autosave.updated = false;
core.saves.autosave.now = 0;
core.ui.closePanel();
core.saves.saveIndex = 1;
core.saves.favorite = [];
@ -2330,6 +2331,7 @@ actions.prototype._clickStorageRemove_current = function () {
core.saves.ids = {};
core.saves.autosave.data = null;
core.saves.autosave.updated = false;
core.saves.autosave.now = 0;
core.ui.closePanel();
core.saves.saveIndex = 1;
core.saves.favorite = [];

View File

@ -1673,17 +1673,12 @@ control.prototype._doSL_save = function (id) {
control.prototype._doSL_load = function (id, callback) {
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];
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)
{
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);
}
@ -1709,7 +1704,7 @@ control.prototype._doSL_load = 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) {
var data = core.saves.autosave.data.splice(core.saves.autosave.now, 1)[0];
core.control.autosave(0);
core.control.autosave(false);
callback(id, data);
}
return;

View File

@ -922,13 +922,13 @@ var functions_d6ad677b_427a_4623_b50f_a445a3b0ef8a =
case 118: // F7开启debug模式
core.debug();
break;
/*case 87: // W开启技能二倍斩
case 70: // F开启技能“二倍斩”
// 检测是否拥有“二倍斩”这个技能道具
if (core.hasItem('skill1')) {
core.status.route.push("key:87");
core.status.route.push("key:70");
core.useItem('skill1', true);
}
break;*/
break;
// 在这里可以任意新增或编辑已有的快捷键内容
/*
case 0: // 使用该按键的keyCode

View File

@ -1,3 +0,0 @@
原先的版本中A键可以回到之前的自动存档状态
现在A和W可以在最近的若干状态来回滚动
为了方便手机 默认56两个数字键是同样功能 可在按键设置中自己修改