mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
v1.3.5
This commit is contained in:
parent
6ba8a5d81d
commit
e0027dd258
3 changed files with 14 additions and 4 deletions
|
|
@ -41,6 +41,15 @@
|
||||||
<link rel="stylesheet" href="icons.css?version=1.3">
|
<link rel="stylesheet" href="icons.css?version=1.3">
|
||||||
<link rel="stylesheet" href="libs/jquery-ui.css">
|
<link rel="stylesheet" href="libs/jquery-ui.css">
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
!function(a,b){var c=window;c.SessionStackKey=a,c[a]=c[a]||{t:b,
|
||||||
|
q:[]};for(var d=["start","stop","identify","getSessionId","log","setOnDataCallback"],e=0;e<d.length;e++)!function(b){
|
||||||
|
c[a][b]=c[a][b]||function(){c[a].q.push([b].concat([].slice.call(arguments,0)));
|
||||||
|
}}(d[e]);var f=document.createElement("script");f.async=1,f.crossOrigin="anonymous",
|
||||||
|
f.src="https://cdn.sessionstack.com/sessionstack.js";var g=document.getElementsByTagName("script")[0];
|
||||||
|
g.parentNode.insertBefore(f,g)}("SessionStack","26e2385f07644805b5326f87d42a4b88");
|
||||||
|
</script>
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="map" width="100%" height="100%">
|
<svg xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="map" width="100%" height="100%">
|
||||||
|
|
|
||||||
|
|
@ -299,7 +299,7 @@
|
||||||
queue.queue({e:s.center, p:0, s:s.i, b});
|
queue.queue({e:s.center, p:0, s:s.i, b});
|
||||||
cost[s.center] = 1;
|
cost[s.center] = 1;
|
||||||
});
|
});
|
||||||
const neutral = cells.i.length / 5000 * 2000 * neutralInput.value * statesNeutral.value; // limit cost for state growth
|
const neutral = cells.i.length / 5000 * 2500 * neutralInput.value * statesNeutral.value; // limit cost for state growth
|
||||||
|
|
||||||
while (queue.length) {
|
while (queue.length) {
|
||||||
const next = queue.dequeue(), n = next.e, p = next.p, s = next.s, b = next.b;
|
const next = queue.dequeue(), n = next.e, p = next.p, s = next.s, b = next.b;
|
||||||
|
|
@ -310,7 +310,7 @@
|
||||||
if (cells.state[e] && e === states[cells.state[e]].center) return; // do not overwrite capital cells
|
if (cells.state[e] && e === states[cells.state[e]].center) return; // do not overwrite capital cells
|
||||||
|
|
||||||
const cultureCost = culture === cells.culture[e] ? -9 : 100;
|
const cultureCost = culture === cells.culture[e] ? -9 : 100;
|
||||||
const populationCost = cells.s[e] ? 20 - cells.s[e] : 2500;
|
const populationCost = cells.h[e] < 20 ? 0 : cells.s[e] ? Math.max(20 - cells.s[e], 0) : 5000;
|
||||||
const biomeCost = getBiomeCost(b, cells.biome[e], type);
|
const biomeCost = getBiomeCost(b, cells.biome[e], type);
|
||||||
const heightCost = getHeightCost(pack.features[cells.f[e]], cells.h[e], type);
|
const heightCost = getHeightCost(pack.features[cells.f[e]], cells.h[e], type);
|
||||||
const riverCost = getRiverCost(cells.r[e], e, type);
|
const riverCost = getRiverCost(cells.r[e], e, type);
|
||||||
|
|
|
||||||
|
|
@ -100,7 +100,7 @@ function editHeightmap() {
|
||||||
if (tooltip.dataset.main) showMainTip();
|
if (tooltip.dataset.main) showMainTip();
|
||||||
|
|
||||||
// move radius circle if drag mode is active
|
// move radius circle if drag mode is active
|
||||||
const pressed = document.querySelector("#brushesButtons > button.pressed");
|
const pressed = document.getElementById("brushesButtons").querySelector("button.pressed");
|
||||||
if (!pressed) return;
|
if (!pressed) return;
|
||||||
moveCircle(p[0], p[1], brushRadius.valueAsNumber, "#333");
|
moveCircle(p[0], p[1], brushRadius.valueAsNumber, "#333");
|
||||||
}
|
}
|
||||||
|
|
@ -151,7 +151,8 @@ function editHeightmap() {
|
||||||
else if (mode === "risk") restoreRiskedData();
|
else if (mode === "risk") restoreRiskedData();
|
||||||
|
|
||||||
// restore initial layers
|
// restore initial layers
|
||||||
viewbox.select("#heights").remove();
|
//viewbox.select("#heights").remove();
|
||||||
|
document.getElementById("heights").remove();
|
||||||
turnButtonOff("toggleHeight");
|
turnButtonOff("toggleHeight");
|
||||||
document.getElementById("mapLayers").querySelectorAll("li").forEach(function(e) {
|
document.getElementById("mapLayers").querySelectorAll("li").forEach(function(e) {
|
||||||
if (editHeightmap.layers.includes(e.id) && !layerIsOn(e.id)) e.click(); // turn on
|
if (editHeightmap.layers.includes(e.id) && !layerIsOn(e.id)) e.click(); // turn on
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue