mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-23 12:31:24 +01:00
Trying to put the formula in the right place
Again, sorry for the mess
This commit is contained in:
parent
a96a42098f
commit
477cbbfc71
1 changed files with 4 additions and 10 deletions
|
|
@ -402,22 +402,16 @@ function editBurg(id) {
|
||||||
document.getElementById("mfcgPreview").setAttribute("src", mfcgURL);
|
document.getElementById("mfcgPreview").setAttribute("src", mfcgURL);
|
||||||
document.getElementById("mfcgLink").setAttribute("href", mfcgURL);
|
document.getElementById("mfcgLink").setAttribute("href", mfcgURL);
|
||||||
}
|
}
|
||||||
|
function getBurgSeed(burg) {
|
||||||
function openMFCG(seed) {
|
return burg.MFCG || Number(`${seed}${String(burg.i).padStart(4, 0)}`);
|
||||||
if (!seed && burg.MFCGlink) {
|
|
||||||
openURL(burg.MFCGlink);
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
const cells = pack.cells;
|
|
||||||
const name = elSelected.text();
|
|
||||||
const size = Math.ceil(2.13*Math.pow(burg.population * populationRate / urbanDensity,0.385));//Math.max(Math.min(rn(burg.population), 100), 6); // to be removed once change on MFDC is done
|
|
||||||
const population = rn(burg.population * populationRate * urbanization);
|
|
||||||
|
|
||||||
function getMFCGlink(burg) {
|
function getMFCGlink(burg) {
|
||||||
const {cells} = pack;
|
const {cells} = pack;
|
||||||
const {name, population, cell} = burg;
|
const {name, population, cell} = burg;
|
||||||
const burgSeed = getBurgSeed(burg);
|
const burgSeed = getBurgSeed(burg);
|
||||||
const size = Math.max(Math.min(rn(population), 100), 6);
|
const size = Math.max(Math.min(rn(population), 100), 6);
|
||||||
|
const size = Math.max(Math.min(Math.ceil(2.13*Math.pow(burg.population * populationRate)), 100), 6);
|
||||||
const people = rn(population * populationRate * urbanization);
|
const people = rn(population * populationRate * urbanization);
|
||||||
|
|
||||||
const hub = +cells.road[cell] > 50;
|
const hub = +cells.road[cell] > 50;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue