diff --git a/index.html b/index.html index 17392d2e..29e19765 100644 --- a/index.html +++ b/index.html @@ -758,6 +758,7 @@ diff --git a/script.js b/script.js index 4ffede90..e69762a6 100644 --- a/script.js +++ b/script.js @@ -3383,6 +3383,7 @@ function fantasyMap() { const labelGroup = burgLabels.select("#"+type); const iconGroup = burgIcons.select("#"+type); burgNameInput.value = manors[id].name; + burgSeedInput.value = manors[id].seed; updateBurgsGroupOptions(); burgSelectGroup.value = labelGroup.attr("id"); burgSelectDefaultFont.value = fonts.indexOf(labelGroup.attr("data-font")); @@ -3545,6 +3546,15 @@ function fantasyMap() { manors[id].name = this.value; $("div[aria-describedby='burgEditor'] .ui-dialog-title").text("Edit Burg: " + this.value); }); + + $("#burgSeedInput").on("input", function() { + if (this.value === "") { + tip("Seed can be blank"); + return; + } + const id = +elSelected.attr("data-id"); + manors[id].seed = this.value; + }); $("#burgNameReCulture, #burgNameReRandom").click(function() { const id = +elSelected.attr("data-id"); @@ -3767,11 +3777,14 @@ function fantasyMap() { // open in MFCG $("#burgSeeInMFCG").click(function() { const id = +elSelected.attr("data-id"); + console.log(manors[id]); const name = manors[id].name; const cell = manors[id].cell; const pop = rn(manors[id].population); const size = pop > 65 ? 65 : pop < 6 ? 6 : pop; - const s = seed + "" + id; + var bs = ""; + if(manors[id].seed) bs += manors[id].seed + const s = seed + "" + id + "" + bs; const hub = cells[cell].crossroad > 2 ? 1 : 0; const river = cells[cell].river ? 1 : 0; const coast = cells[cell].port !== undefined ? 1 : 0; @@ -8047,6 +8060,7 @@ function fantasyMap() { population = population > 1e4 ? si(population) : rn(population, -1); el.append(''); el.append(''); + el.append(''); var capital = states[s].capital; var type = "z-burg"; // usual burg by default if (b.i === capital) {el.append(''); type = "c-capital";}