From ec91d8c7a29b50f5fbdbb5436cb518e0d7a7b035 Mon Sep 17 00:00:00 2001 From: oc Date: Fri, 21 Dec 2018 10:50:11 +0800 Subject: [PATCH] Alert error message --- libs/control.js | 8 +++++--- libs/utils.js | 14 +++++++------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/libs/control.js b/libs/control.js index a90f14e8..9d7a412e 100644 --- a/libs/control.js +++ b/libs/control.js @@ -2076,10 +2076,10 @@ control.prototype.doSL = function (id, type) { }, function(err) { console.info(err); if (core.platform.useLocalForage) { - alert("存档失败,请将控制台的报错信息反馈给管理员。"); + alert("存档失败,错误信息:\n"+err); } else { - alert("存档空间不足,请先使用垃圾存档清理工具进行清理!"); + alert("存档失败,错误信息:\n"+err+"\n建议使用垃圾存档清理工具进行清理!"); } }) return; @@ -2093,7 +2093,9 @@ control.prototype.doSL = function (id, type) { return; } if (core.isset(data.hashCode) && data.hashCode != core.utils.hashCode(data.hero)) { - alert("存档校验失败,请勿修改存档文件!"); + if (confirm("存档校验失败,请勿修改存档文件!\n你想回放此存档的录像吗?")) { + core.startGame(data.hard, data.hero.flags.__seed__, core.decodeRoute(data.route)); + } return; } if (data.version != core.firstData.version) { diff --git a/libs/utils.js b/libs/utils.js index 5f2931e2..22407208 100644 --- a/libs/utils.js +++ b/libs/utils.js @@ -436,18 +436,17 @@ utils.prototype.decodeRoute = function (route) { index++; return str; } + var mp = { + "U": "up", + "D": "down", + "L": "left", + "R": "right" + } while (index