mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
commit
cb549d517c
2 changed files with 8 additions and 4 deletions
|
|
@ -208,8 +208,12 @@
|
||||||
if (cells.haven[i] && pack.features[cells.f[cells.haven[i]]].type === "lake") return "Lake";
|
if (cells.haven[i] && pack.features[cells.f[cells.haven[i]]].type === "lake") return "Lake";
|
||||||
if (cells.h[i] > 60) return "Highland";
|
if (cells.h[i] > 60) return "Highland";
|
||||||
if (cells.r[i] && cells.r[i].length > 100 && cells.r[i].length >= pack.rivers[0].length) return "River";
|
if (cells.r[i] && cells.r[i].length > 100 && cells.r[i].length >= pack.rivers[0].length) return "River";
|
||||||
if ([1, 2, 3, 4].includes(cells.biome[i])) return "Nomadic";
|
|
||||||
if (cells.biome[i] > 4 && cells.biome[i] < 10) return "Hunting";
|
if (!cells.burg[i] || pack.burgs[cells.burg[i]].population < 6) {
|
||||||
|
if (population < 5 && [1, 2, 3, 4].includes(cells.biome[i])) return "Nomadic";
|
||||||
|
if (cells.biome[i] > 4 && cells.biome[i] < 10) return "Hunting";
|
||||||
|
}
|
||||||
|
|
||||||
return "Generic";
|
return "Generic";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -106,13 +106,13 @@ function showMapTooltip(point, e, i, g) {
|
||||||
parent.id === "provinceEmblems" ? [pack.provinces, "province"] :
|
parent.id === "provinceEmblems" ? [pack.provinces, "province"] :
|
||||||
[pack.states, "state"];
|
[pack.states, "state"];
|
||||||
const i = +e.target.dataset.i;
|
const i = +e.target.dataset.i;
|
||||||
highlightEmblemElement(type, g[i]);
|
if (event.shiftKey) highlightEmblemElement(type, g[i]);
|
||||||
|
|
||||||
d3.select(e.target).raise();
|
d3.select(e.target).raise();
|
||||||
d3.select(parent).raise();
|
d3.select(parent).raise();
|
||||||
|
|
||||||
const name = g[i].fullName || g[i].name;
|
const name = g[i].fullName || g[i].name;
|
||||||
tip(`${name} ${type} emblem. Click to edit`);
|
tip(`${name} ${type} emblem. Click to edit. Hold Shift to show associated area or place`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (group === "rivers") {
|
if (group === "rivers") {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue