|
@@ -539,11 +539,7 @@ export class GameService implements OnModuleInit {
|
|
|
const run = game.status === GameStatus.Running
|
|
const run = game.status === GameStatus.Running
|
|
|
return await this.end(id).then((res) => {
|
|
return await this.end(id).then((res) => {
|
|
|
if (game.autoReset) {
|
|
if (game.autoReset) {
|
|
|
- this.sysConfig.getNumber('reset_delay', 0).then((resetDelay) => {
|
|
|
|
|
- setTimeout(resetDelay * 1000).then(() => {
|
|
|
|
|
- this.resetGame(id, run)
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.resetGame(id, run)
|
|
|
}
|
|
}
|
|
|
return res
|
|
return res
|
|
|
})
|
|
})
|
|
@@ -656,7 +652,11 @@ export class GameService implements OnModuleInit {
|
|
|
|
|
|
|
|
this.logger.log(`重置游戏完成`)
|
|
this.logger.log(`重置游戏完成`)
|
|
|
if (run) {
|
|
if (run) {
|
|
|
- this.startRun(newGame.id)
|
|
|
|
|
|
|
+ this.sysConfig.getNumber('reset_delay', 0).then((resetDelay) => {
|
|
|
|
|
+ setTimeout(resetDelay * 1000).then(() => {
|
|
|
|
|
+ this.startRun(newGame.id)
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
}
|
|
}
|
|
|
return newGame
|
|
return newGame
|
|
|
}
|
|
}
|