Merge pull request #578 from Azgaar/dev

Dev
This commit is contained in:
Azgaar 2021-02-21 01:11:25 +03:00 committed by GitHub
commit cb549d517c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View file

@ -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";
} }

View file

@ -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") {