diff --git a/index.html b/index.html index 16e69f49..cf33e512 100644 --- a/index.html +++ b/index.html @@ -8040,7 +8040,7 @@ - + diff --git a/modules/cultures-generator.js b/modules/cultures-generator.js index 0bb72d6d..7f89b76f 100644 --- a/modules/cultures-generator.js +++ b/modules/cultures-generator.js @@ -190,12 +190,13 @@ window.Cultures = (function () { name = Names.getCulture(culture, 5, 8, ""); base = pack.cultures[culture].base; } + const code = abbreviate( name, pack.cultures.map(c => c.code) ); const i = pack.cultures.length; - const color = d3.color(d3.scaleSequential(d3.interpolateRainbow)(Math.random())).hex(); + const color = getRandomColor(); // define emblem shape let shield = culture.shield; @@ -214,7 +215,7 @@ window.Cultures = (function () { area: 0, rural: 0, urban: 0, - origins: [0], + origins: [pack.cells.culture[center]], code, shield }); diff --git a/modules/dynamic/editors/cultures-editor.js b/modules/dynamic/editors/cultures-editor.js index b7218372..7f886edb 100644 --- a/modules/dynamic/editors/cultures-editor.js +++ b/modules/dynamic/editors/cultures-editor.js @@ -822,6 +822,7 @@ function addCulture() { if (pack.cells.h[center] < 20) return tip("You cannot place culture center into the water. Please click on a land cell", false, "error"); + const occupied = pack.cultures.some(c => !c.removed && c.center === center); if (occupied) return tip("This cell is already a culture center. Please select a different cell", false, "error"); diff --git a/versioning.js b/versioning.js index 2ea16dfe..393373ca 100644 --- a/versioning.js +++ b/versioning.js @@ -1,7 +1,7 @@ "use strict"; // version and caching control -const version = "1.96.04"; // generator version, update each time +const version = "1.96.05"; // generator version, update each time { document.title += " v" + version;