Current Version(without the save changes)

This commit is contained in:
StempunkDev 2023-07-28 15:39:34 +02:00
parent 0936a03c60
commit 104fd9b8d5
5 changed files with 14 additions and 17 deletions

View file

@ -639,6 +639,7 @@ export function resolveVersionConflicts(version) {
if (version < 1.89) {
//May need a major bump
options.SouthPoleTemperature = +temperatureNorthPoleInput.value;
options.tempNorthPole = +temperatureNorthPoleInput.value;
options.tempSouthPole = +temperatureNorthPoleInput.value;
}
}

View file

@ -589,7 +589,7 @@ async function parseLoadedData(data) {
// set options
yearInput.value = options.year;
eraInput.value = options.era;
temperatureSouthPoleOutput.value = temperatureSouthPoleInput.value = options.SouthPoleTemperature;
temperatureSouthPoleOutput.value = temperatureSouthPoleInput.value = options.tempSouthPole;
shapeRendering.value = viewbox.attr("shape-rendering") || "geometricPrecision";
if (window.restoreDefaultEvents) restoreDefaultEvents();

View file

@ -613,12 +613,8 @@ function randomizeOptions() {
if (randomize || !locked("temperatureEquator"))
temperatureEquatorOutput.value = temperatureEquatorInput.value = rand(tMax - 10, tMax);
if (randomize || !locked("temperaturePole")) {
temperatureNorthPoleOutput.value
= temperatureNorthPoleInput.value
= temperatureSouthPoleOutput.value
= temperatureSouthPoleInput.value
= options.SouthPoleTemperature
= rand(tMin, tMin + 30);
temperatureNorthPoleOutput.value = temperatureNorthPoleInput.value = rand(tMin, tMin + 30);
temperatureSouthPoleOutput.value = temperatureSouthPoleInput.value = rand(tMin, tMin + 30);
}

View file

@ -111,8 +111,6 @@ function editWorld() {
document.getElementById("temperatureNorthPoleF").innerHTML = rn((tNorthPole * 9) / 5 + 32);
const tSouthPole = +document.getElementById("temperatureSouthPoleOutput").value;
document.getElementById("temperatureSouthPoleF").innerHTML = rn((tSouthPole * 9) / 5 + 32);
//Update Settings to match the slider(there may be a better solution)
options.SouthPoleTemperature = +tSouthPole;
globe.selectAll(".tempGradient90").attr("stop-color", clr(1 - (tNorthPole - tMin) / (tMax - tMin)));
globe.selectAll(".tempGradient60").attr("stop-color", clr(1 - (tEq - ((tEq - tNorthPole) * 2) / 3 - tMin) / (tMax - tMin)));
globe.selectAll(".tempGradient30").attr("stop-color", clr(1 - (tEq - ((tEq - tNorthPole) * 1) / 3 - tMin) / (tMax - tMin)));