mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 17:51:24 +01:00
1.1.14
This commit is contained in:
parent
b6ed03258a
commit
aadae58072
32 changed files with 1938 additions and 1577 deletions
|
|
@ -74,7 +74,10 @@
|
|||
return;
|
||||
}
|
||||
|
||||
const sorted = cells.i.filter(i => cells.s[i] > 2).sort((a, b) => cells.s[b] - cells.s[a]); // filtered and sorted array of indexes
|
||||
const burgs = pack.burgs.filter(b => b.i && !b.removed);
|
||||
const sorted = burgs.length > +religionsInput.value
|
||||
? burgs.sort((a, b) => b.population - a.population).map(b => b.cell)
|
||||
: cells.i.filter(i => cells.s[i] > 2).sort((a, b) => cells.s[b] - cells.s[a]);
|
||||
const religionsTree = d3.quadtree();
|
||||
const spacing = (graphWidth + graphHeight) / 6 / religionsInput.value; // base min distance between towns
|
||||
const cultsCount = Math.floor(rand(10, 40) / 100 * religionsInput.value);
|
||||
|
|
@ -264,6 +267,7 @@
|
|||
const cells = pack.cells, religions = pack.religions;
|
||||
|
||||
religions.filter(r => r.i).forEach(r => {
|
||||
// generate religion code (abbreviation)
|
||||
r.code = getCode(r.name);
|
||||
|
||||
// move religion center if it's not within religion area after expansion
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue