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
1e60b477fb
commit
783ea4a35f
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);
|
||||
else if (id === "optionsSeed") generateMapWithSeed();
|
||||
else if (id === "uiSizeInput") changeUIsize(value);
|
||||
else if (id === "yearInput") changeYear();
|
||||
else if (id === "eraInput") changeEra();
|
||||
});
|
||||
|
||||
optionsContent.addEventListener("click", function(event) {
|
||||
|
|
@ -408,6 +410,18 @@ function regenerateEra() {
|
|||
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
|
||||
function restoreDefaultOptions() {
|
||||
localStorage.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue