From a96a42098f4dadfffed6645db35dde28babe24cc Mon Sep 17 00:00:00 2001 From: Dranorter Date: Wed, 6 Oct 2021 17:27:27 -0400 Subject: [PATCH] Watabou cities integration change, new Urban Density setting New setting does not yet save/load - I don't want to change the .map file format. --- modules/ui/burg-editor.js | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/ui/burg-editor.js b/modules/ui/burg-editor.js index c33cd488..8b20cee3 100644 --- a/modules/ui/burg-editor.js +++ b/modules/ui/burg-editor.js @@ -403,9 +403,15 @@ function editBurg(id) { document.getElementById("mfcgLink").setAttribute("href", mfcgURL); } - function getBurgSeed(burg) { - return burg.MFCG || Number(`${seed}${String(burg.i).padStart(4, 0)}`); - } + function openMFCG(seed) { + 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) { const {cells} = pack;