mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
1.11.0
This commit is contained in:
parent
905573dde7
commit
efd9159737
4 changed files with 12 additions and 11 deletions
4
main.js
4
main.js
|
|
@ -7,11 +7,11 @@
|
|||
// See also https://github.com/Azgaar/Fantasy-Map-Generator/issues/153
|
||||
|
||||
"use strict";
|
||||
const version = "1.1"; // generator version
|
||||
const version = "1.11"; // generator version
|
||||
document.title += " v" + version;
|
||||
|
||||
// if map version is not stored, clear localStorage and show a message
|
||||
if (localStorage.getItem("version") != version) {
|
||||
if (rn(localStorage.getItem("version"),1) !== rn(version,1)) {
|
||||
localStorage.clear();
|
||||
setTimeout(showWelcomeMessage, 8000);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -825,13 +825,14 @@ function parseLoadedData(data) {
|
|||
drawCoastline();
|
||||
}
|
||||
|
||||
if (version < 1.2) {
|
||||
// v 1.1 added new attributes
|
||||
if (version < 1.11) {
|
||||
// v 1.11 added new attributes
|
||||
terrs.attr("scheme", "bright").attr("terracing", 0).attr("skip", 5).attr("relax", 0).attr("curve", 0);
|
||||
svg.select("#oceanic > rect").attr("id", "oceanicPattern");
|
||||
oceanLayers.attr("layers", "-6,-3,-1");
|
||||
gridOverlay.attr("type", "pointyHex").attr("size", 10);
|
||||
|
||||
// v 1.1 added cultures heirarchy tree
|
||||
// v 1.11 added cultures heirarchy tree
|
||||
if (pack.cultures[1] && !pack.cultures[1].code) {
|
||||
pack.cultures.filter(c => c.i).forEach(c => {
|
||||
c.origin = 0;
|
||||
|
|
|
|||
|
|
@ -877,7 +877,7 @@ function drawGrid() {
|
|||
console.time("drawGrid");
|
||||
gridOverlay.selectAll("*").remove();
|
||||
const type = styleGridType.value;
|
||||
const size = +styleGridSize.value;
|
||||
const size = Math.max(+styleGridSize.value, 2);
|
||||
if (type === "pointyHex" || type === "flatHex") {
|
||||
const points = getHexGridPoints(size, type);
|
||||
const hex = "m" + getHex(size, type).slice(0, 4).join("l");
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue