mirror of
https://github.com/VickScarlet/lifeRestart.git
synced 2025-07-21 19:43:58 +08:00
fix repl bug
This commit is contained in:
18
repl/app.js
18
repl/app.js
@@ -49,7 +49,12 @@ class App {
|
|||||||
this.output('Now Loading...');
|
this.output('Now Loading...');
|
||||||
this.#talentExtend = global.localStorage.talentExtend;
|
this.#talentExtend = global.localStorage.talentExtend;
|
||||||
await this.#life.initial();
|
await this.#life.initial();
|
||||||
this.output('\rLoading Complete.\ntype \x1B[4m/remake\x1B[24m to start', true);
|
this.output(`\rLoading Complete.
|
||||||
|
人生重开模拟器
|
||||||
|
这垃圾人生一秒也不想待了
|
||||||
|
\n🎉键入 \x1B[4m/remake\x1B[24m 开始游戏`,
|
||||||
|
true
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
io(input, output, exit) {
|
io(input, output, exit) {
|
||||||
@@ -405,7 +410,6 @@ class App {
|
|||||||
return this.trajectory(enter);
|
return this.trajectory(enter);
|
||||||
case this.Steps.TRAJECTORY:
|
case this.Steps.TRAJECTORY:
|
||||||
if(!this.#isEnd) return this.trajectory(enter);
|
if(!this.#isEnd) return this.trajectory(enter);
|
||||||
if(this.#interval) clearInterval(this.#interval);
|
|
||||||
this.#step = this.Steps.SUMMARY;
|
this.#step = this.Steps.SUMMARY;
|
||||||
return `${
|
return `${
|
||||||
this.summary()
|
this.summary()
|
||||||
@@ -421,12 +425,16 @@ class App {
|
|||||||
if(enter) {
|
if(enter) {
|
||||||
if(this.#interval) {
|
if(this.#interval) {
|
||||||
clearInterval(this.#interval);
|
clearInterval(this.#interval);
|
||||||
|
this.#interval = null;
|
||||||
this.#auto = false;
|
this.#auto = false;
|
||||||
} else if(this.#auto) {
|
} else if(this.#auto) {
|
||||||
this.#interval = setInterval(
|
this.#interval = setInterval(
|
||||||
()=>{
|
()=>{
|
||||||
const trajectory = this.next();
|
const trajectory = this.next();
|
||||||
if(this.#isEnd && this.#interval) clearInterval(this.#interval);
|
if(this.#isEnd && this.#interval) {
|
||||||
|
clearInterval(this.#interval);
|
||||||
|
this.#interval = null;
|
||||||
|
}
|
||||||
if(!this.#isEnd) return this.output(`${trajectory}\n`);
|
if(!this.#isEnd) return this.output(`${trajectory}\n`);
|
||||||
return this.output(trajectory, true);
|
return this.output(trajectory, true);
|
||||||
}
|
}
|
||||||
@@ -454,8 +462,8 @@ class App {
|
|||||||
|
|
||||||
prop() {
|
prop() {
|
||||||
const { CHR, INT, STR, MNY } = this.#propertyAllocation;
|
const { CHR, INT, STR, MNY } = this.#propertyAllocation;
|
||||||
return `Property Allocation []
|
return `🎉属性分配
|
||||||
🎉 剩余点数 ${this.less()}
|
剩余点数 ${this.less()}
|
||||||
|
|
||||||
属性(TAG) 当前值
|
属性(TAG) 当前值
|
||||||
颜值(CHR) ${CHR}
|
颜值(CHR) ${CHR}
|
||||||
|
Reference in New Issue
Block a user