mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.4.30
This commit is contained in:
parent
edb8469216
commit
5b931d2ac5
1 changed files with 14 additions and 0 deletions
|
|
@ -109,6 +109,8 @@ optionsContent.addEventListener("change", function(event) {
|
||||||
if (id === "zoomExtentMin" || id === "zoomExtentMax") changeZoomExtent(value);
|
if (id === "zoomExtentMin" || id === "zoomExtentMax") changeZoomExtent(value);
|
||||||
else if (id === "optionsSeed") generateMapWithSeed();
|
else if (id === "optionsSeed") generateMapWithSeed();
|
||||||
else if (id === "uiSizeInput") changeUIsize(value);
|
else if (id === "uiSizeInput") changeUIsize(value);
|
||||||
|
else if (id === "yearInput") changeYear();
|
||||||
|
else if (id === "eraInput") changeEra();
|
||||||
});
|
});
|
||||||
|
|
||||||
optionsContent.addEventListener("click", function(event) {
|
optionsContent.addEventListener("click", function(event) {
|
||||||
|
|
@ -408,6 +410,18 @@ function regenerateEra() {
|
||||||
options.eraShort = options.era.split(" ").map(w => w[0].toUpperCase()).join("");
|
options.eraShort = options.era.split(" ").map(w => w[0].toUpperCase()).join("");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function changeYear() {
|
||||||
|
if (!yearInputthis.value) return;
|
||||||
|
if (isNaN(+yearInput.value)) {tip("Current year should be a number", false, "error"); return;}
|
||||||
|
options.year = +yearInput.value;
|
||||||
|
}
|
||||||
|
|
||||||
|
function changeEra() {
|
||||||
|
if (!eraInput.value) return;
|
||||||
|
lock("era");
|
||||||
|
options.era = eraInput.value;
|
||||||
|
}
|
||||||
|
|
||||||
// remove all saved data from LocalStorage and reload the page
|
// remove all saved data from LocalStorage and reload the page
|
||||||
function restoreDefaultOptions() {
|
function restoreDefaultOptions() {
|
||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue