diff --git a/index.html b/index.html index 60f463c9..635a1f37 100644 --- a/index.html +++ b/index.html @@ -3023,7 +3023,7 @@
Neutral
Suspicion
Enemy
-
Unknown
+
Unknown
Rival
Vassal
Suzerain
diff --git a/lang/lang-en.js b/lang/lang-en.js index 2ef89bbd..d4da51a9 100644 --- a/lang/lang-en.js +++ b/lang/lang-en.js @@ -355,7 +355,7 @@ const sourceDataForReference = { NeedToAdd!: "Neutral means states relations are neither positive nor negative", NeedToAdd!: "Suspicion means shate has a cautious distrust of another state", NeedToAdd!: "Enemies are states at war with each other", - NeedToAdd!: "Relations are unknown if states do not have enought information about each other", + NeedToAdd!: "Relations are unknown if states do not have enough information about each other", NeedToAdd!: "Rivalry is a state of competing for dominance in the region", NeedToAdd!: "Vassal is a state having obligation to its suzerain", NeedToAdd!: "Suzerain is a state having some control over its vassals", @@ -508,4 +508,4 @@ const sourceDataForReference = { NeedToAdd!: "Load .map file from local disk", NeedToAdd!: "Load .map file from URL (server should allow CORS)", NeedToAdd!: "Load map from browser storage (if saved before)" -}; \ No newline at end of file +}; diff --git a/main.js b/main.js index cd76e80b..eb4c4715 100644 --- a/main.js +++ b/main.js @@ -785,7 +785,7 @@ function generatePrecipitation() { let westerly = [], easterly = [], southerly = 0, northerly = 0; {// latitude bands - // x4 = 0-5 latitude: wet throught the year (rising zone) + // x4 = 0-5 latitude: wet through the year (rising zone) // x2 = 5-20 latitude: wet summer (rising zone), dry winter (sinking zone) // x1 = 20-30 latitude: dry all year (sinking zone) // x2 = 30-50 latitude: wet winter (rising zone), dry summer (sinking zone) diff --git a/modules/burgs-and-states.js b/modules/burgs-and-states.js index 1fb2d9b5..1d940653 100644 --- a/modules/burgs-and-states.js +++ b/modules/burgs-and-states.js @@ -42,7 +42,7 @@ if (sorted.length < count * 10) { count = Math.floor(sorted.length / 10); if (!count) {console.warn(`There is no populated cells. Cannot generate states`); return burgs;} - else {console.warn(`Not enought populated cells (${sorted.length}). Will generate only ${count} states`);} + else {console.warn(`Not enough populated cells (${sorted.length}). Will generate only ${count} states`);} } let burgsTree = d3.quadtree(); diff --git a/modules/cultures-generator.js b/modules/cultures-generator.js index cf18c94b..fa2cb253 100644 --- a/modules/cultures-generator.js +++ b/modules/cultures-generator.js @@ -27,7 +27,7 @@ }); return; } else { - console.warn(`Not enought populated cells (${populated.length}). Will generate only ${count} cultures`); + console.warn(`Not enough populated cells (${populated.length}). Will generate only ${count} cultures`); alertMessage.innerHTML = ` There are only ${populated.length} populated cells and it's insufficient livable area.
Only ${count} out of ${culturesInput.value} requested cultures will be generated.
diff --git a/modules/river-generator.js b/modules/river-generator.js index 3431aca7..bef47df6 100644 --- a/modules/river-generator.js +++ b/modules/river-generator.js @@ -56,7 +56,7 @@ //const min = cells.c[i][d3.scan(cells.c[i], (a, b) => h[a] - h[b])]; // downhill cell let min = cells.c[i][d3.scan(cells.c[i], (a, b) => h[a] - h[b])]; // downhill cell - // allow only one river can flow thought a lake + // allow only one river can flow through a lake const cf = features[cells.f[i]]; // current cell feature if (cf.river && cf.river !== cells.r[i]) { cells.fl[i] = 0; diff --git a/modules/routes-generator.js b/modules/routes-generator.js index e02c4a6f..af45dc4e 100644 --- a/modules/routes-generator.js +++ b/modules/routes-generator.js @@ -8,7 +8,7 @@ console.time("generateMainRoads"); const cells = pack.cells, burgs = pack.burgs.filter(b => b.i && !b.removed); const capitals = burgs.filter(b => b.capital); - if (capitals.length < 2) return []; // not enought capitals to build main roads + if (capitals.length < 2) return []; // not enough capitals to build main roads const paths = []; // array to store path segments for (const b of capitals) { @@ -28,7 +28,7 @@ const getTrails = function() { console.time("generateTrails"); const cells = pack.cells, burgs = pack.burgs.filter(b => b.i && !b.removed); - if (burgs.length < 2) return []; // not enought burgs to build trails + if (burgs.length < 2) return []; // not enough burgs to build trails let paths = []; // array to store path segments for (const f of pack.features.filter(f => f.land)) { @@ -243,4 +243,4 @@ return [from, exit, false]; } -}))); \ No newline at end of file +}))); diff --git a/modules/ui/elevation-profile.js b/modules/ui/elevation-profile.js index 995f0270..f8b40d29 100644 --- a/modules/ui/elevation-profile.js +++ b/modules/ui/elevation-profile.js @@ -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); } diff --git a/modules/ui/tools.js b/modules/ui/tools.js index 357163b3..a72800f5 100644 --- a/modules/ui/tools.js +++ b/modules/ui/tools.js @@ -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: