diff --git a/bot/src/utils/misc.ts b/bot/src/utils/misc.ts index 894fe2d9c..30257be97 100644 --- a/bot/src/utils/misc.ts +++ b/bot/src/utils/misc.ts @@ -70,7 +70,7 @@ export function ParseGPT(str: string) { // this is an interesting way of game checking noah const gameConfig = GetGameConfig(game) as GameConfig | undefined; - if (!gameConfig || !gameConfig.validPlaytypes.includes(playtype)) { + if (!gameConfig || !gameConfig.playtypes.includes(playtype)) { throw new Error(`Invalid GPT Combination '${str}'.`); } diff --git a/bot/src/utils/options.ts b/bot/src/utils/options.ts index 41e42fefe..3be1a8ba2 100644 --- a/bot/src/utils/options.ts +++ b/bot/src/utils/options.ts @@ -11,7 +11,7 @@ const GPTChoices: Array<[string, string]> = []; for (const game of ServerConfig.games) { const gameConfig = GetGameConfig(game); - for (const playtype of gameConfig.validPlaytypes) { + for (const playtype of gameConfig.playtypes) { GPTChoices.push([FormatGame(game, playtype), `${game}:${playtype}`]); } } diff --git a/bot/src/webhookHandlers/goalsAchieved.ts b/bot/src/webhookHandlers/goalsAchieved.ts index d30ca4491..c2ba5202a 100644 --- a/bot/src/webhookHandlers/goalsAchieved.ts +++ b/bot/src/webhookHandlers/goalsAchieved.ts @@ -36,7 +36,7 @@ export async function HandleGoalAchievedV1( const gameConfig = GetGameConfig(game); - const shouldShowPlaytype = gameConfig.validPlaytypes.length !== 1; + const shouldShowPlaytype = gameConfig.playtypes.length !== 1; const embed = CreateEmbed(userDoc.id) .setTitle( diff --git a/bot/src/webhookHandlers/questAchieved.ts b/bot/src/webhookHandlers/questAchieved.ts index 4b6a2d841..87d66e77a 100644 --- a/bot/src/webhookHandlers/questAchieved.ts +++ b/bot/src/webhookHandlers/questAchieved.ts @@ -27,7 +27,7 @@ export async function HandleQuestAchievedV1( const quest = await GetQuestWithID(event.questID, game, playtype); const gameConfig = GetGameConfig(game); - const shouldShowPlaytype = gameConfig.validPlaytypes.length > 1 ? ` (${playtype})` : ""; + const shouldShowPlaytype = gameConfig.playtypes.length > 1 ? ` (${playtype})` : ""; const embed = CreateEmbed(userDoc.id).setTitle( `${userDoc.username} just completed the ${quest.name}${shouldShowPlaytype} quest!` diff --git a/client/src/app/pages/dashboard/games/_game/PlaytypeSelect.tsx b/client/src/app/pages/dashboard/games/_game/PlaytypeSelect.tsx index 72e6bc8e7..54ab67933 100644 --- a/client/src/app/pages/dashboard/games/_game/PlaytypeSelect.tsx +++ b/client/src/app/pages/dashboard/games/_game/PlaytypeSelect.tsx @@ -29,7 +29,7 @@ export default function PlaytypeSelect({
- {gameConfig.validPlaytypes.map((pt) => ( + {gameConfig.playtypes.map((pt) => ( { const gameConfig = GetGameConfig(parent.game as any); - if (!gameConfig.validPlaytypes.includes(self)) { + if (!gameConfig.playtypes.includes(self)) { return `Invalid playtype '${self}' for ${parent.game}`; } diff --git a/client/src/app/routes/GameRoutes.tsx b/client/src/app/routes/GameRoutes.tsx index 9783af583..007466f2c 100644 --- a/client/src/app/routes/GameRoutes.tsx +++ b/client/src/app/routes/GameRoutes.tsx @@ -59,8 +59,8 @@ export default function GameRoutes() { return ( - {gameConfig.validPlaytypes.length === 1 ? ( - + {gameConfig.playtypes.length === 1 ? ( + ) : ( - {gameConfig.validPlaytypes.length === 1 ? ( + {gameConfig.playtypes.length === 1 ? ( ) : ( { const gameConfig = GetGameConfig(game); - return gameConfig.validPlaytypes.map((playtype) => ( + return gameConfig.playtypes.map((playtype) => (