diff --git a/client/src/components/level.tsx b/client/src/components/level.tsx index 25c582b1..3940ab9d 100644 --- a/client/src/components/level.tsx +++ b/client/src/components/level.tsx @@ -38,7 +38,6 @@ import { codeAtom, leanMonacoAtom, lockEditorModeAtom, selectionsAtom, typewrite import { gameIdAtom, levelIdAtom, navigateToLandingPageAtom, worldIdAtom } from '../store/location-atoms' import { gameInfoAtom, levelInfoAtom } from '../store/query-atoms' import { helpAtom } from '../store/chat-atoms' -import { inventoryOverviewAtom } from '../store/inventory-atoms' import { mobileAtom } from '../store/preferences-atoms' const reconfigureLeanMonacoClient = async (leanMonaco: LeanMonaco, options: LeanMonacoOptions) => { diff --git a/client/src/store/editor-atoms.ts b/client/src/store/editor-atoms.ts index df96210a..3a77f1ee 100644 --- a/client/src/store/editor-atoms.ts +++ b/client/src/store/editor-atoms.ts @@ -1,9 +1,10 @@ import { atom } from "jotai"; import { LeanMonaco, LeanMonacoOptions } from 'lean4monaco' import { gameIdAtom } from "./location-atoms"; -import { levelProgressAtom, progressAtom } from "./progress-atoms"; +import { difficultyAtom, levelProgressAtom, progressAtom } from "./progress-atoms"; import { Selection } from "./progress-types"; import { levelInfoAtom } from "./query-atoms"; +import { inventoryAtom } from "./inventory-atoms"; /** Options for the LeanMonaco instance */ export const leanMonacoOptionsAtom = atom(get => { @@ -18,6 +19,12 @@ export const leanMonacoOptionsAtom = atom(get => { // See docstring of `LeanMonacoOptions`! // For example: "editor.wordWrap": true, + }, + clientOptions: { + initializationOptions: { + difficulty: get(difficultyAtom), + inventory: get(inventoryAtom), + } } }})