mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
Fixed Loading and Saving
New Maps save a Dummy 0 at settings[17]
This commit is contained in:
parent
c0c5161f97
commit
c8ae576221
3 changed files with 4 additions and 3 deletions
|
|
@ -109,7 +109,7 @@ function getSettings() {
|
||||||
mapSize: mapSizeOutput.value,
|
mapSize: mapSizeOutput.value,
|
||||||
latitudeO: latitudeOutput.value,
|
latitudeO: latitudeOutput.value,
|
||||||
temperatureEquator: temperatureEquatorOutput.value,
|
temperatureEquator: temperatureEquatorOutput.value,
|
||||||
temperaturePole: temperaturePoleOutput.value,
|
temperaturePole: 0, //Moved to options
|
||||||
prec: precOutput.value,
|
prec: precOutput.value,
|
||||||
options: options,
|
options: options,
|
||||||
mapName: mapName.value,
|
mapName: mapName.value,
|
||||||
|
|
|
||||||
|
|
@ -219,7 +219,7 @@ async function parseLoadedData(data) {
|
||||||
if (settings[14]) mapSizeInput.value = mapSizeOutput.value = minmax(settings[14], 1, 100);
|
if (settings[14]) mapSizeInput.value = mapSizeOutput.value = minmax(settings[14], 1, 100);
|
||||||
if (settings[15]) latitudeInput.value = latitudeOutput.value = minmax(settings[15], 0, 100);
|
if (settings[15]) latitudeInput.value = latitudeOutput.value = minmax(settings[15], 0, 100);
|
||||||
if (settings[16]) temperatureEquatorInput.value = temperatureEquatorOutput.value = settings[16];
|
if (settings[16]) temperatureEquatorInput.value = temperatureEquatorOutput.value = settings[16];
|
||||||
if (settings[17]) temperatureNorthPoleInput.value = temperatureNorthPoleOutput.value = settings[17];
|
if (settings[17]) temperatureNorthPoleInput.value = temperatureNorthPoleOutput.value = settings[17]; //Not used see options: only for compatibility
|
||||||
if (settings[18]) precInput.value = precOutput.value = settings[18];
|
if (settings[18]) precInput.value = precOutput.value = settings[18];
|
||||||
if (settings[19]) options = JSON.parse(settings[19]);
|
if (settings[19]) options = JSON.parse(settings[19]);
|
||||||
if (settings[20]) mapName.value = settings[20];
|
if (settings[20]) mapName.value = settings[20];
|
||||||
|
|
@ -589,6 +589,7 @@ async function parseLoadedData(data) {
|
||||||
// set options
|
// set options
|
||||||
yearInput.value = options.year;
|
yearInput.value = options.year;
|
||||||
eraInput.value = options.era;
|
eraInput.value = options.era;
|
||||||
|
temperatureNorthPoleOutput.value = temperatureNorthPoleInput.value = options.tempNorthPole;
|
||||||
temperatureSouthPoleOutput.value = temperatureSouthPoleInput.value = options.tempSouthPole;
|
temperatureSouthPoleOutput.value = temperatureSouthPoleInput.value = options.tempSouthPole;
|
||||||
shapeRendering.value = viewbox.attr("shape-rendering") || "geometricPrecision";
|
shapeRendering.value = viewbox.attr("shape-rendering") || "geometricPrecision";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ function getMapData() {
|
||||||
mapSizeOutput.value,
|
mapSizeOutput.value,
|
||||||
latitudeOutput.value,
|
latitudeOutput.value,
|
||||||
temperatureEquatorOutput.value,
|
temperatureEquatorOutput.value,
|
||||||
temperatureNorthPoleOutput.value,
|
0, //Dummy for tempNorthOutput.value
|
||||||
precOutput.value,
|
precOutput.value,
|
||||||
JSON.stringify(options),
|
JSON.stringify(options),
|
||||||
mapName.value,
|
mapName.value,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue