reinstate economics logic

This commit is contained in:
sofronaspe 2024-09-26 00:20:25 -07:00
parent cea9b1a48a
commit cb486fa0e8
17 changed files with 2179 additions and 42 deletions

View file

@ -346,6 +346,13 @@ function selectStyleElement() {
emblemsBurgSizeInput.value = emblems.select("#burgEmblems").attr("data-size") || 1;
}
if (styleElement === "goods") {
styleStrokeWidth.style.display = "block";
styleStrokeWidthInput.value = el.attr("stroke-width") || "";
styleResources.style.display = "block";
styleResourcesCircle.checked = +el.attr("data-circle");
}
// update group options
styleGroupSelect.options.length = 0; // remove all options
if (["routes", "labels", "coastline", "lakes", "anchors", "burgIcons", "borders", "terrs"].includes(styleElement)) {
@ -971,6 +978,12 @@ emblemsBurgSizeInput.on("change", e => {
drawEmblems();
});
styleResourcesCircle.on("change", e => {
goods.attr("data-circle", +this.checked);
goods.selectAll("*").remove();
drawResources();
})
// request a URL to image to be used as a texture
function textureProvideURL() {
alertMessage.innerHTML = /* html */ `Provide a texture image URL: