mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-22 03:51:23 +01:00
Merge branch 'v1.96' into scale-bar-styling
This commit is contained in:
commit
ebb97f78d0
6 changed files with 23 additions and 15 deletions
|
|
@ -8004,7 +8004,7 @@
|
|||
<script src="utils/graphUtils.js?v=1.93.12"></script>
|
||||
<script src="utils/nodeUtils.js"></script>
|
||||
<script src="utils/numberUtils.js?v=1.89.08"></script>
|
||||
<script src="utils/polyfills.js?v=1.93.00"></script>
|
||||
<script src="utils/polyfills.js?v=1.95.03"></script>
|
||||
<script src="utils/probabilityUtils.js?v=1.88.00"></script>
|
||||
<script src="utils/stringUtils.js"></script>
|
||||
<script src="utils/languageUtils.js"></script>
|
||||
|
|
@ -8042,13 +8042,13 @@
|
|||
|
||||
<script defer src="modules/relief-icons.js"></script>
|
||||
<script defer src="modules/ui/style.js?v=1.96.00"></script>
|
||||
<script defer src="modules/ui/editors.js?v=1.93.10"></script>
|
||||
<script defer src="modules/ui/tools.js?v=1.92.00"></script>
|
||||
<script defer src="modules/ui/editors.js?v=1.95.04"></script>
|
||||
<script defer src="modules/ui/tools.js?v=1.95.01"></script>
|
||||
<script defer src="modules/ui/world-configurator.js?v=1.91.05"></script>
|
||||
<script defer src="modules/ui/heightmap-editor.js?v=1.93.00"></script>
|
||||
<script defer src="modules/ui/provinces-editor.js?v=1.92.00"></script>
|
||||
<script defer src="modules/ui/biomes-editor.js?v=1.91.05"></script>
|
||||
<script defer src="modules/ui/namesbase-editor.js?v=1.89.26"></script>
|
||||
<script defer src="modules/ui/namesbase-editor.js?v=1.95.02"></script>
|
||||
<script defer src="modules/ui/elevation-profile.js"></script>
|
||||
<script defer src="modules/ui/temperature-graph.js?v=1.90.03"></script>
|
||||
<script defer src="modules/ui/routes-editor.js?v=1.89.04"></script>
|
||||
|
|
|
|||
|
|
@ -341,10 +341,7 @@ function cultureChangeColor() {
|
|||
const callback = newFill => {
|
||||
$el.fill = newFill;
|
||||
pack.cultures[cultureId].color = newFill;
|
||||
cults
|
||||
.select("#culture" + cultureId)
|
||||
.attr("fill", newFill)
|
||||
.attr("stroke", newFill);
|
||||
cults.select("#culture" + cultureId).attr("fill", newFill);
|
||||
debug.select("#cultureCenter" + cultureId).attr("fill", newFill);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1182,7 +1182,7 @@ async function editStates() {
|
|||
|
||||
async function editCultures() {
|
||||
if (customization) return;
|
||||
const Editor = await import("../dynamic/editors/cultures-editor.js?v=1.91.00");
|
||||
const Editor = await import("../dynamic/editors/cultures-editor.js?v=1.95.04");
|
||||
Editor.open();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -244,11 +244,13 @@ function editNamesbase() {
|
|||
|
||||
Names.clearChains();
|
||||
if (override) nameBases = [];
|
||||
const unsafe = new RegExp(/[|/]/, "g");
|
||||
|
||||
data.forEach(base => {
|
||||
const [name, min, max, d, m, names] = base.split("|");
|
||||
const secureNames = names.replace(/[/|]/g, "");
|
||||
nameBases.push({name, min, max, d, m, b: secureNames});
|
||||
const [rawName, min, max, d, m, rawNames] = base.split("|");
|
||||
const name = rawName.replace(unsafe, "");
|
||||
const names = rawNames.replace(unsafe, "");
|
||||
nameBases.push({name, min, max, d, m, b: names});
|
||||
});
|
||||
|
||||
createBasesList();
|
||||
|
|
|
|||
|
|
@ -361,10 +361,10 @@ function regenerateBurgs() {
|
|||
|
||||
const score = new Int16Array(cells.s.map(s => s * Math.random())); // cell score for capitals placement
|
||||
const sorted = cells.i.filter(i => score[i] > 0 && cells.culture[i]).sort((a, b) => score[b] - score[a]); // filtered and sorted array of indexes
|
||||
const existingStatesCount = states.filter(s => s.i && !s.removed).length;
|
||||
const burgsCount =
|
||||
manorsInput.value === "1000"
|
||||
? rn(sorted.length / 5 / (grid.points.length / 10000) ** 0.8) + states.length
|
||||
: +manorsInput.value + states.length;
|
||||
(manorsInput.value === "1000" ? rn(sorted.length / 5 / (grid.points.length / 10000) ** 0.8) : +manorsInput.value) +
|
||||
existingStatesCount;
|
||||
const spacing = (graphWidth + graphHeight) / 150 / (burgsCount ** 0.7 / 66); // base min distance between towns
|
||||
|
||||
for (let i = 0; i < sorted.length && burgs.length < burgsCount; i++) {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,15 @@ if (Array.prototype.flat === undefined) {
|
|||
};
|
||||
}
|
||||
|
||||
// at
|
||||
if (Array.prototype.at === undefined) {
|
||||
Array.prototype.at = function (index) {
|
||||
if (index < 0) index += this.length;
|
||||
if (index < 0 || index >= this.length) return undefined;
|
||||
return this[index];
|
||||
};
|
||||
}
|
||||
|
||||
// readable stream iterator: https://bugs.chromium.org/p/chromium/issues/detail?id=929585#c10
|
||||
if (ReadableStream.prototype[Symbol.asyncIterator] === undefined) {
|
||||
ReadableStream.prototype[Symbol.asyncIterator] = async function* () {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue