mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
refactor: update project root detection and quest directory path
This commit is contained in:
1 parent
fbe1319183
commit
cb1e395579
2 files changed
+17
-4
No files matched your search
@@ -9,6 +9,7 @@ import {
|
||||
IQuest,
|
||||
} from '../../../packages/game'
|
||||
import logger from '../utils/logger.js'
|
||||
import config from '../config.js'
|
||||
|
||||
class QuestValidationError extends Error {
|
||||
questId: string
|
||||
@@ -37,7 +38,7 @@ class QuestValidationError extends Error {
|
||||
|
||||
class QuestManager {
|
||||
private quests = new Map<string, IQuest>()
|
||||
private questDirectory = path.join(process.cwd(), '..', 'quests')
|
||||
private questDirectory = path.join(config.projectRoot, 'quests')
|
||||
|
||||
get(id: string) {
|
||||
return this.quests.get(id)
|
||||
|
||||
Reference in new issue
Block a user