Skip to content

Commit

Permalink
Merge pull request #2511 from planetarium/release/2.7.6
Browse files Browse the repository at this point in the history
backmerge Release/2.7.6 to dev
  • Loading branch information
Akamig authored Dec 13, 2024
2 parents 3e55c6c + 725e283 commit ab2d3af
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 3 deletions.
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.

0 comments on commit ab2d3af

Please sign in to comment.