mirror of
https://github.com/LCE-Hub/LCE-Emerald-Launcher.git
synced 2026-08-20 04:27:29 +00:00
feat(lceonline): -token for client
This commit is contained in:
parent
2593979b4f
commit
87f7787d9a
BIN
public/images/lce_online.png
Normal file
BIN
public/images/lce_online.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 41 KiB |
|
|
@ -77,6 +77,17 @@ export const BASE_EDITIONS = [
|
||||||
logo: "/images/moonEdition.png",
|
logo: "/images/moonEdition.png",
|
||||||
panorama: "moonedition",
|
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 = [
|
const PARTNERSHIP_SERVERS = [
|
||||||
|
|
@ -481,10 +492,18 @@ export function useGameManager({
|
||||||
setIsGameRunning(true);
|
setIsGameRunning(true);
|
||||||
try {
|
try {
|
||||||
getCurrentWindow().minimize();
|
getCurrentWindow().minimize();
|
||||||
|
const currentEdition = editions.find((e) => e.instanceId === profile);
|
||||||
await TauriService.launchGame(
|
await TauriService.launchGame(
|
||||||
profile,
|
profile,
|
||||||
PARTNERSHIP_SERVERS,
|
PARTNERSHIP_SERVERS,
|
||||||
extraLaunchArgs,
|
currentEdition?.lceOnline
|
||||||
|
? extraLaunchArgs!.concat([
|
||||||
|
"-token",
|
||||||
|
localStorage.getItem("lceonline_session")
|
||||||
|
? JSON.parse(localStorage.getItem("lceonline_session")!).accessToken
|
||||||
|
: "",
|
||||||
|
])
|
||||||
|
: extraLaunchArgs,
|
||||||
);
|
);
|
||||||
} catch (e: unknown) {
|
} catch (e: unknown) {
|
||||||
console.error(e);
|
console.error(e);
|
||||||
|
|
@ -635,4 +654,4 @@ export function useGameManager({
|
||||||
updateCustomization,
|
updateCustomization,
|
||||||
saveCustomPath,
|
saveCustomPath,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ export interface Edition {
|
||||||
comingSoon?: boolean;
|
comingSoon?: boolean;
|
||||||
category?: string[];
|
category?: string[];
|
||||||
officialDLC?: string;
|
officialDLC?: string;
|
||||||
|
lceOnline?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CustomEditionInput {
|
export interface CustomEditionInput {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue