diff --git a/public/images/lce_online.png b/public/images/lce_online.png new file mode 100644 index 0000000..6bc4424 Binary files /dev/null and b/public/images/lce_online.png differ diff --git a/src/hooks/useGameManager.ts b/src/hooks/useGameManager.ts index 72315bb..944b00f 100644 --- a/src/hooks/useGameManager.ts +++ b/src/hooks/useGameManager.ts @@ -77,6 +77,17 @@ export const BASE_EDITIONS = [ logo: "/images/moonEdition.png", panorama: "moonedition", }, + { + id: "lceonline", + name: "LCE Online Client", + desc: "Restoring the classic LCE online experience with friends, world hosting, leaderboards & more.", + url: "https://github.com/lceonline/MCLEClient/releases/download/v1.0.0b/LCENWindows64.zip", + titleImage: "/images/lceonline.png", + supportsSlimSkins: false, + logo: "/images/lce_online.png", + panorama: "vanilla_tu19", + lceOnline: true, + }, ]; const PARTNERSHIP_SERVERS = [ @@ -481,10 +492,18 @@ export function useGameManager({ setIsGameRunning(true); try { getCurrentWindow().minimize(); + const currentEdition = editions.find((e) => e.instanceId === profile); await TauriService.launchGame( profile, PARTNERSHIP_SERVERS, - extraLaunchArgs, + currentEdition?.lceOnline + ? extraLaunchArgs!.concat([ + "-token", + localStorage.getItem("lceonline_session") + ? JSON.parse(localStorage.getItem("lceonline_session")!).accessToken + : "", + ]) + : extraLaunchArgs, ); } catch (e: unknown) { console.error(e); @@ -635,4 +654,4 @@ export function useGameManager({ updateCustomization, saveCustomPath, }; -} \ No newline at end of file +} diff --git a/src/types/edition.ts b/src/types/edition.ts index 7c8a538..5ade209 100644 --- a/src/types/edition.ts +++ b/src/types/edition.ts @@ -13,6 +13,7 @@ export interface Edition { comingSoon?: boolean; category?: string[]; officialDLC?: string; + lceOnline?: boolean; } export interface CustomEditionInput {