Skip to content

Commit

Permalink
fix: check scheme before setting
Browse files Browse the repository at this point in the history
  • Loading branch information
Azgaar committed Mar 24, 2024
1 parent ff39143 commit af927ed
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8093,7 +8093,7 @@
<script defer src="libs/rgbquant.min.js"></script>
<script defer src="libs/jquery.ui.touch-punch.min.js"></script>
<script defer src="modules/io/save.js?v=1.96.00"></script>
<script defer src="modules/io/load.js?v=1.97.02"></script>
<script defer src="modules/io/load.js?v=1.97.04"></script>
<script defer src="modules/io/cloud.js?v=1.96.00"></script>
<script defer src="modules/io/export.js?v=1.97.03"></script>

Expand Down
2 changes: 1 addition & 1 deletion modules/dynamic/auto-update.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,7 @@ export function resolveVersionConflicts(version) {

const opacity = terrs.attr("opacity");
const filter = terrs.attr("filter");
const scheme = terrs.attr("scheme");
const scheme = terrs.attr("scheme") || "bright";
const terracing = terrs.attr("terracing");
const skip = terrs.attr("skip");
const relax = terrs.attr("relax");
Expand Down
10 changes: 5 additions & 5 deletions modules/io/load.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,16 +456,16 @@ async function parseLoadedData(data, mapVersion) {
{
// dynamically import and run auto-update script
const versionNumber = parseFloat(params[0]);
const {resolveVersionConflicts} = await import("../dynamic/auto-update.js?v=1.97.00");
const {resolveVersionConflicts} = await import("../dynamic/auto-update.js?v=1.97.04");
resolveVersionConflicts(versionNumber);
}

// add custom heightmap color scheme if any
if (heightmapColorSchemes) {
const oceanScheme = terrs.select("#oceanHeights").attr("scheme");
const landScheme = terrs.select("#landHeights").attr("scheme");
if (!(oceanScheme in heightmapColorSchemes)) addCustomColorScheme(oceanScheme);
if (!(landScheme in heightmapColorSchemes)) addCustomColorScheme(landScheme);
const oceanScheme = byId("oceanHeights")?.getAttribute("scheme");
if (oceanScheme && !(oceanScheme in heightmapColorSchemes)) addCustomColorScheme(oceanScheme);
const landScheme = byId("#landHeights")?.getAttribute("scheme");
if (landScheme && !(landScheme in heightmapColorSchemes)) addCustomColorScheme(landScheme);
}

{
Expand Down
2 changes: 1 addition & 1 deletion versioning.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"use strict";

// version and caching control
const version = "1.97.03"; // generator version, update each time
const version = "1.97.04"; // generator version, update each time

{
document.title += " v" + version;
Expand Down

0 comments on commit af927ed

Please sign in to comment.