mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
Added cell info to elevation profile and corrected some spelling
This commit is contained in:
parent
468e553f7c
commit
60a26a8ab5
9 changed files with 31 additions and 12 deletions
|
|
@ -196,7 +196,26 @@ function showElevationProfile(data, routeLen, isRiver) {
|
|||
const x = chartData.points[k][0];
|
||||
const y = yOffset + chartHeight;
|
||||
const c = biomesData.color[chartData.biome[k]];
|
||||
const dataTip = biomesData.name[chartData.biome[k]]+" (" + chartData.height[k] + " " + hu + ", cell " + chartData.cell[k] + ")";
|
||||
|
||||
const cell = chartData.cell[k];
|
||||
const culture = pack.cells.culture[cell];
|
||||
const religion = pack.cells.religion[cell];
|
||||
const province = pack.cells.province[cell];
|
||||
const state = pack.cells.state[cell];
|
||||
let pop = pack.cells.pop[cell];
|
||||
if (chartData.burg[k]) {
|
||||
pop += pack.burgs[chartData.burg[k]].population * urbanization.value;
|
||||
}
|
||||
|
||||
const populationDesc = rn(pop * populationRate.value);
|
||||
|
||||
const provinceDesc = province ? ", " + pack.provinces[province].name : "";
|
||||
const dataTip = biomesData.name[chartData.biome[k]] +
|
||||
provinceDesc +
|
||||
", " + pack.states[state].name +
|
||||
", " + pack.religions[religion].name +
|
||||
", " + pack.cultures[culture].name +
|
||||
" (height: " + chartData.height[k] + " " + hu + ", population " + populationDesc + ", cell " + chartData.cell[k] + ")";
|
||||
|
||||
g.append("rect").attr("stroke", c).attr("fill", c).attr("x", x).attr("y", y).attr("width", xscale(1)).attr("height", 15).attr("data-tip", dataTip);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ function regenerateStates() {
|
|||
return;
|
||||
}
|
||||
if (burgs.length < +regionsInput.value) {
|
||||
tip(`Not enought burgs to generate ${regionsInput.value} states. Will generate only ${burgs.length} states`, false, "warn");
|
||||
tip(`Not enough burgs to generate ${regionsInput.value} states. Will generate only ${burgs.length} states`, false, "warn");
|
||||
}
|
||||
|
||||
// burg local ids sorted by a bit randomized population:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue