post-merge fixes

This commit is contained in:
Peter 2022-11-27 14:46:31 -05:00
parent c24a786519
commit f3396941e4
5 changed files with 81 additions and 109 deletions

View file

@ -96,12 +96,6 @@ function editBurg(id) {
document.getElementById('burgExport').innerHTML = getExport(deals.filter((deal) => deal.exporter === b.i));
document.getElementById('burgImport').innerHTML = '';
// economics block
document.getElementById('burgProduction').innerHTML = getProduction(b.produced);
const deals = pack.trade.deals;
document.getElementById('burgExport').innerHTML = getExport(deals.filter((deal) => deal.exporter === b.i));
document.getElementById('burgImport').innerHTML = '';
//toggle lock
updateBurgLockIcon();
@ -663,16 +657,8 @@ function editBurg(id) {
}
}
});
} else {
const message = 'Are you sure you want to remove the burg? <br>This action cannot be reverted';
const onConfirm = () => {
removeBurg(id);
$('#burgEditor').dialog('close');
};
confirmationDialog({title: 'Remove burg', message, confirm: 'Remove', onConfirm});
}
}
}
function closeBurgEditor() {
document.getElementById('burgRelocate').classList.remove('pressed');
burgLabels.selectAll('text').call(d3.drag().on('drag', null)).classed('draggable', false);

View file

@ -3,7 +3,7 @@
function editHeightmap(options) {
const {mode, tool} = options || {};
restartHistory();
viewbox.insert('g', '#terrs').attr('id', 'heights');
viewbox.insert("g", "#terrs").attr("id", "heights");
if (!mode) showModeDialog();
else enterHeightmapEditMode(mode);
@ -982,9 +982,6 @@ function editHeightmap(options) {
const steps = byId("templateBody").querySelectorAll("#templateBody > div");
if (!steps.length) return;
const seed = byId("templateSeed").value;
if (seed) Math.random = aleaPRNG(seed);
grid.cells.h = createTypedArray({maxValue: 100, length: grid.points.length});
HeightmapGenerator.setGraph(grid);
restartHistory();

View file

@ -343,13 +343,6 @@ function regenerateBurgs() {
if (document.getElementById("statesEditorRefresh")?.offsetParent) statesEditorRefresh.click();
}
function regenerateResources() {
Resources.generate();
goods.selectAll('*').remove();
if (layerIsOn('toggleResources')) drawResources();
refreshAllEditors();
}
function regenerateResources() {
Resources.generate();
goods.selectAll("*").remove();