Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/2.7.6 to main #2507

Merged
merged 6 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "NineChronicles",
"productName": "Nine Chronicles",
"version": "2.7.5",
"version": "2.7.6",
"description": "Game Launcher for Nine Chronicles",
"author": "Planetarium <[email protected]>",
"license": "GPL-3.0",
Expand Down
14 changes: 12 additions & 2 deletions src/main/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,19 @@ async function initializeConfig() {

registry = await data.json();
if (registry === undefined) throw Error("Failed to parse registry.");
if (!Array.isArray(registry) || registry.length <= 0) {
throw Error("Registry is empty or invalid. No planets found.");
}

const planet = registry.find((v) => v.id === remoteConfig.Planet);
if (!planet) throw Error(`Planet failed to initialize: ${planet}`);
const planet =
registry.find((v) => v.id === remoteConfig.Planet) ??
(() => {
console.log(
"No matching PlanetID found in registry. Using the first planet.",
);
remoteConfig.Planet = registry[0].id;
return registry[0];
})();

remoteNode = await initializeNode(planet.rpcEndpoints, true);
console.log(registry);
Expand Down
Binary file modified src/renderer/resources/launcher-icon/internal/AppIcon.icns
Binary file not shown.
Binary file modified src/renderer/resources/launcher-icon/internal/app.ico
Binary file not shown.
Binary file modified src/renderer/resources/launcher-icon/main/AppIcon.icns
Binary file not shown.
Binary file modified src/renderer/resources/launcher-icon/main/app.ico
Binary file not shown.
Binary file modified src/renderer/resources/launcher-icon/preview/AppIcon.icns
Binary file not shown.
Binary file modified src/renderer/resources/launcher-icon/preview/app.ico
Binary file not shown.
Loading