diff --git a/packages/kitten-scientists/source/UserScript.ts b/packages/kitten-scientists/source/UserScript.ts index 33fa9e000..e921082a6 100644 --- a/packages/kitten-scientists/source/UserScript.ts +++ b/packages/kitten-scientists/source/UserScript.ts @@ -7,6 +7,7 @@ import { Engine, EngineState, GameLanguage, SupportedLanguage } from "./Engine.j import { ScienceSettings } from "./settings/ScienceSettings.js"; import { SpaceSettings } from "./settings/SpaceSettings.js"; import { WorkshopSettings } from "./settings/WorkshopSettings.js"; +import { State } from "./state/State.js"; import { cdebug, cerror, cinfo, cwarn } from "./tools/Log.js"; import { Game } from "./types/index.js"; import { UserInterface } from "./ui/UserInterface.js"; @@ -237,6 +238,12 @@ export class UserScript { this.engine.imessage("settings.imported"); } + async importSettingsFromUrl(url: string) { + const importState = new State(url); + const settings = await importState.resolve(); + settings.report.aggregate(console); + } + /** * Copies an engine state to the clipboard. *