Trying to put the formula in the right place

Again, sorry for the mess
This commit is contained in:
Dranorter 2021-10-06 17:37:12 -04:00
parent a96a42098f
commit 477cbbfc71

View file

@ -402,22 +402,16 @@ function editBurg(id) {
document.getElementById("mfcgPreview").setAttribute("src", mfcgURL);
document.getElementById("mfcgLink").setAttribute("href", mfcgURL);
}
function openMFCG(seed) {
if (!seed && burg.MFCGlink) {
openURL(burg.MFCGlink);
return;
function getBurgSeed(burg) {
return burg.MFCG || Number(`${seed}${String(burg.i).padStart(4, 0)}`);
}
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) {
const {cells} = pack;
const {name, population, cell} = burg;
const burgSeed = getBurgSeed(burg);
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 hub = +cells.road[cell] > 50;