Skip to content

Commit

Permalink
Fix local memory repr; change help text
Browse files Browse the repository at this point in the history
  • Loading branch information
huzecong committed Jun 26, 2018
1 parent b5913d6 commit 67e7a63
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
7 changes: 6 additions & 1 deletion application/static/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -441,6 +441,7 @@ App.controller('AppCtrl', ['$scope', '$http', '$mdToast', '$mdMenu', '$timeout',
let setItem = (function () {
let setItem = localStorage.setItem.bind(localStorage);
return function (key, value) {
value = value.toString();
setItem(key, value);
memory[key] = value;
};
Expand Down Expand Up @@ -850,7 +851,7 @@ App.controller('AppCtrl', ['$scope', '$http', '$mdToast', '$mdMenu', '$timeout',
};

$scope.loadLocalScript = function () {
let cheat = function() {
let cheat = function () {
runActions([
set("#脱单", false),
set("#体力", 10),
Expand Down Expand Up @@ -897,6 +898,10 @@ App.controller('AppCtrl', ['$scope', '$http', '$mdToast', '$mdMenu', '$timeout',
};

$scope.saveMemory = function () {
if ($scope.events[$scope.current.eventIndex].type === "exam") {
showToast("考试期间不能存档");
return;
}
if ($scope.current.pageType === "ending" || $scope.current.pageType === "achievements") {
showToast("当前页面无法存档");
return;
Expand Down
2 changes: 1 addition & 1 deletion run.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,6 @@ def gather_scripts():
filename = os.path.join(dirname, filename)
if os.path.isfile(filename):
extra_files.append(filename)
app.run(host='0.0.0.0', port=app.config.get('PORT', 8000), debug=True, extra_files=extra_files)
app.run(host='127.0.0.1', port=app.config.get('PORT', 8000), debug=True, extra_files=extra_files)
else:
app.run(host='0.0.0.0', port=app.config.get('PORT', 8000), debug=False)
14 changes: 12 additions & 2 deletions scripts/0/0_主菜单.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@
{
id: "help3",
text: [
"在游戏中,你需要根据文本描述,做出你自己的选择。不存在最优的选择,也不存在唯一的正确答案,请尽情探索所有的可能吧。",
"当然,也有不可选的选项、没有选项的剧情,以及存在唯一正确答案的考试题。"
"在游戏中,你需要根据文本描述,做出你自己的选择。不存在最优的选择,也不存在唯一的正确答案。",
"请尽情探索所有的可能,解锁一个个成就吧!",
],
actions: [
jump("help4")
Expand All @@ -87,6 +87,16 @@
"没错,和熬夜爆肝赶DDL一样,你需要付出一些努力才可以通关。你需要做的就是在时间限制内快速点击“<i>肝!</i>”按钮,达到指定次数方可通关。",
"不过,事情并不会一直一帆风顺。在爆肝期间,你还需要排除干扰,集中注意力。加油吧!"
],
actions: [
jump("help5")
]
},
{
id: "help5",
text: [
"游戏过程中,你可以随时存档(考试时除外)与读档。点击右上角,在弹出的菜单中选择即可。",
"存档在本地保存。即使刷新或者关闭页面,存档也不会丢失。"
],
actions: [
jump("help6")
]
Expand Down
Binary file modified scripts/image/帮助/爆肝界面.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 67e7a63

Please sign in to comment.