mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
feat: include responses from Exceptions
This commit is contained in:
1 parent
0f0f43b838
commit
254e4f75ed
3 files changed
+18
-13
No files matched your search
@@ -1,14 +1,7 @@
|
||||
/* eslint-disable no-await-in-loop */
|
||||
import { Condition } from './condition/Condition'
|
||||
import { Event } from './Event'
|
||||
import { GlobalException, StageException } from './Exception'
|
||||
import {
|
||||
IQuest,
|
||||
IStage,
|
||||
IFileExistenceChecker,
|
||||
ICommand,
|
||||
IResponse,
|
||||
} from './schema'
|
||||
import { GlobalException } from './Exception'
|
||||
import { IQuest, IFileExistenceChecker, ICommand, IResponse } from './schema'
|
||||
import { Stage } from './Stage'
|
||||
|
||||
export class Quest {
|
||||
@@ -72,8 +65,6 @@ export class Quest {
|
||||
}
|
||||
|
||||
getResponses(completed: string[]): IResponse[] {
|
||||
return this.quest.stages
|
||||
.filter((stage) => completed.includes(stage.id))
|
||||
.map((stage) => stage.response)
|
||||
return completed.map((id) => this.events.get(id)!.getResponse())
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user