From 7054c9daeffc528e338bbf0da8746af0d9589899 Mon Sep 17 00:00:00 2001 From: nickofolas Date: Mon, 18 Apr 2022 11:44:00 -0500 Subject: [PATCH] Fix editor theme migration --- src/Constants.ts | 2 +- src/SaveObject.tsx | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Constants.ts b/src/Constants.ts index 066f79468..74668dd4c 100644 --- a/src/Constants.ts +++ b/src/Constants.ts @@ -118,7 +118,7 @@ export const CONSTANTS: { LatestUpdate: string; } = { VersionString: "1.6.4", - VersionNumber: 14, + VersionNumber: 15, // Speed (in ms) at which the main loop is updated _idleSpeed: 200, diff --git a/src/SaveObject.tsx b/src/SaveObject.tsx index 8cf6d29b2..20f8bb8ec 100755 --- a/src/SaveObject.tsx +++ b/src/SaveObject.tsx @@ -23,6 +23,7 @@ import { LocationName } from "./Locations/data/LocationNames"; import { SxProps } from "@mui/system"; import { PlayerObject } from "./PersonObjects/Player/PlayerObject"; import { pushGameSaved } from "./Electron"; +import { defaultMonacoTheme } from "./ScriptEditor/ui/themes"; /* SaveObject.js * Defines the object used to save/load games @@ -394,8 +395,8 @@ function evaluateVersionCompatibility(ver: string | number): void { delete anyPlayer.resleeves; } } - if (ver < 14) { - delete (Settings as any).EditorTheme; + if (ver < 15) { + (Settings as any).EditorTheme = { ...defaultMonacoTheme }; } } }